From: <no...@at...> - 2006-06-16 14:03:32
|
lazy loading doesn't work inside <component ...> ------------------------------------------------ Key: HHH-1843 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH= -1843 Project: Hibernate3 Type: Bug Environment: Postgresl, Hibernate3 Reporter: J=C3=BCrgen Rose 1. setting property lazy=3D"true" on a component has no effect at all 2. any many-to-one property within that component with lazy=3D"no-proxy" is= fetched right away, which leads to n+1 Selects Example: class User { ... } class MetaData { Date creationTime; User creationUser; Date modificateionTime; User modificationUser; ... } class Foo { String attr1; String attr2; MetaData metaData; ... }=20 <class name=3D"Foo" table=3D"foo"> <property name=3D"attr1" column=3D"attr1" /> <property name=3D"attr1" column=3D"attr1" /> =20 <component name=3D"metaData" class=3D"MetaData" lazy=3D"true"> <many-to-one name=3D"creationUser" class=3D"User" column=3D"creatio= n_user" not-found=3D"ignore" fetch=3D"select" lazy=3D"no-proxy"></many-to-o= ne> <property name=3D"creationTime" type=3D"timestamp" column=3D"creati= on_time" /> <many-to-one name=3D"modificationUser" class=3D"User" column=3D"mod= ification_user" not-found=3D"ignore" fetch=3D"select" lazy=3D"no-proxy"></m= any-to-one> <property name=3D"modificationTime" type=3D"timestamp" column=3D"mo= dification_time" /> </component> </class>=20 This makes it unusable for us, therefore it is even a major issue. --=20 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 |