[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-2938) Found object is not proxy after criteria.list

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Fri Nov 9 06:10:29 EST 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Max Rydahl Andersen closed HHH-2938.
------------------------------------

    Resolution: Rejected

this is the expected behavior - why would you want a different instance than the one already loaded in the same session.

Use the forum for usage questions.

> Found object is not proxy after criteria.list
> ---------------------------------------------
>
>                 Key: HHH-2938
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2938
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.5
>         Environment: Oracle 10, Weblogic 9.
> Hibernate-Version: 3.2.5.ga
>            Reporter: Valery Novikov
>
> Let's suppose what we have one hibernate mapped class - Item.
> Issue is reproduced by following TC:
> 1) Open transaction;
> 2) Find all "Item"s using - criteria.list() (And to be sure what all object are exactly loaded - call any it's method in cycle);
> 3) Find any Item by ID using session.load(Item.class, ID)
> 4) Close transaction;
> 5) let's call any method of found item, for example - item.getName;
> Expected result - LazyInitializationException.
> Actual result - all it's done withouth error, it's means what returned by session.load object is not proxy, but should be.
> ...Propably problem in aggressive transaction cache usage.
> if we are try to evict object from session using session.evict method ( just after step 2), result of a 3-th step will be a proxy object..
> And few questions by step 2 - objects found using criteria.list() method are not proxy, why?? What i can do if i want to get some their lazy fields? .. if return type is Map for example (really it is PersistentMap) - i recieve exception.  There is posible to guarantee what returned objects are proxy?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list