My complete stack Trace!!
Code:
net.sf.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: nl.strohalm.cyclos.entities.accounts.LimitedAccount (loaded object was of wrong class)
at net.sf.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:456)
at net.sf.hibernate.loader.Loader.getRow(Loader.java:423)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:209)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:950)
at net.sf.hibernate.loader.Loader.list(Loader.java:941)
at net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:118)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3571)
at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:223)
All relations in the database are seted up correctly!!
In log this is my query:
Code:
Hibernate: select this.member_id as member_id7_, account1_.account_id as account_id0_, account1_.subclass as subclass0_, account1_.creationDate as creation3_0_, account1_.lastAmount as lastAmount0_, account1_.owner_id as owner_id0_, account2_.account_id as account_id1_, account2_.subclass as subclass1_, account2_.creationDate as creation3_1_, account2_.lastAmount as lastAmount1_, account2_.owner_id as owner_id1_, iaccountow3_.member_id as member_id2_, iaccountow3_.subclass as subclass2_, iaccountow3_.postalCode as postalCode2_, iaccountow3_.telephone1 as telephone12_, iaccountow3_.telephone2 as telephone22_, iaccountow3_.city as city2_, iaccountow3_.email as email2_, iaccountow3_.address as address2_, iaccountow3_.firstName as firstName2_, iaccountow3_.lastName as lastName2_, iaccountow3_.enabled as enabled2_, iaccountow3_.creationDate as creatio12_2_, iaccountow3_.group_admin_id as group_a13_2_, iaccountow3_.province as province2_, iaccountow3_.hideAddress as hideAdd15_2_, iaccountow3_.hideBirthday as hideBir16_2_, iaccountow3_.hideGender as hideGender2_, iaccountow3_.hidePostalCode as hidePos18_2_, iaccountow3_.hideTelephone1 as hideTel19_2_, iaccountow3_.hideTelephone2 as hideTel20_2_, iaccountow3_.hideFax as hideFax2_, iaccountow3_.url as url2_, iaccountow3_.fax as fax2_, iaccountow3_.keywords as keywords2_, iaccountow3_.gender as gender2_, iaccountow3_.birthDay as birthDay2_, iaccountow3_.group_member_id as group_m27_2_, iaccountow3_.area_id as area_id2_, groupadmin4_.group_id as group_id3_, groupadmin4_.name as name3_, groupmembe5_.group_id as group_id4_, groupmembe5_.name as name4_, area6_.area_id as area_id5_, area6_.name as name5_, limitedacc7_.account_id as account_id6_, limitedacc7_.creationDate as creation3_6_, limitedacc7_.lastAmount as lastAmount6_, limitedacc7_.owner_id as owner_id6_ from members this left outer join accounts account1_ on this.member_id=account1_.owner_id left outer join accounts account2_ on account1_.account_id=account2_.account_id left outer join members iaccountow3_ on account2_.owner_id=iaccountow3_.member_id left outer join groups groupadmin4_ on iaccountow3_.group_admin_id=groupadmin4_.group_id left outer join groups groupmembe5_ on iaccountow3_.group_member_id=groupmembe5_.group_id left outer join areas area6_ on iaccountow3_.area_id=area6_.area_id left outer join accounts limitedacc7_ on this.member_id=limitedacc7_.account_id where 1=1 and this.subclass='nl.strohalm.cyclos.entities.application.Application'
No more entries in log becouse this is the first select of application!!