From: <no...@at...> - 2005-05-27 13:18:34
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-545 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-545 Summary: Hibernate doesn't seem to allow nested properties in an Order object. Type: Bug Status: Unassigned Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Versions: 3.0.5 Assignee: Reporter: Stephen Earl Created: Fri, 27 May 2005 8:17 AM Updated: Fri, 27 May 2005 8:17 AM Environment: Hibernate 3.0.5 JBoss 4.0.2 MySql 5.0.4 BETA Description: When passing "nested" properties in an Order expression a QueryException is thrown stating: could not resolve property: artist.name of: ami.server.dto.AlbumDTO. My mapping files are below: <album.hbm.xml> <hibernate-mapping package="ami.server.dto"> <class name="AlbumDTO" table="calliope.albums"> <id name="id" column="id"> <generator class="native"/> </id> <property name="title" column="title" not-null="true"/> <property name="upc" column="upc" not-null="true"/> <many-to-one name="artist" column="artist_id" class="ArtistDTO" fetch="join"/> </class> </hibernate-mapping> <artist.hbm.xml> <hibernate-mapping package="ami.server.dto"> <class name="ArtistDTO" table="calliope.artists"> <id name="id" column="id"> <generator class="native"/> </id> <property name="name" column="name" not-null="true"/> <property name="searchName" column="search_name" not-null="false"/> </class> </hibernate-mapping> The full source code of the method being called is below: public List<AlbumDTO> findOrderBy (AlbumDTO obj, Order[] orderBy) throws Exception { Criteria criteria = HibernateUtil.getSession().createCriteria(AlbumDTO.class); criteria.add(Example.create(obj)); for (int i=0; i<orderBy.length; i++) { criteria.addOrder(orderBy[i]); } return criteria.list(); } Should this functionality work in Hibernate 3.0.5? Is it a bug? --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-05-27 13:24:32
|
The following comment has been added to this issue: Author: Stephen Earl Created: Fri, 27 May 2005 8:23 AM Body: Forgot to mention that what is being passed in in my Order object is this: Order.asc("artist.name") --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-545?page=comments#action_17959 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-545 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-545 Summary: Hibernate doesn't seem to allow nested properties in an Order object. Type: Bug Status: Unassigned Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Versions: 3.0.5 Assignee: Reporter: Stephen Earl Created: Fri, 27 May 2005 8:17 AM Updated: Fri, 27 May 2005 8:23 AM Environment: Hibernate 3.0.5 JBoss 4.0.2 MySql 5.0.4 BETA Description: When passing "nested" properties in an Order expression a QueryException is thrown stating: could not resolve property: artist.name of: ami.server.dto.AlbumDTO. My mapping files are below: <album.hbm.xml> <hibernate-mapping package="ami.server.dto"> <class name="AlbumDTO" table="calliope.albums"> <id name="id" column="id"> <generator class="native"/> </id> <property name="title" column="title" not-null="true"/> <property name="upc" column="upc" not-null="true"/> <many-to-one name="artist" column="artist_id" class="ArtistDTO" fetch="join"/> </class> </hibernate-mapping> <artist.hbm.xml> <hibernate-mapping package="ami.server.dto"> <class name="ArtistDTO" table="calliope.artists"> <id name="id" column="id"> <generator class="native"/> </id> <property name="name" column="name" not-null="true"/> <property name="searchName" column="search_name" not-null="false"/> </class> </hibernate-mapping> The full source code of the method being called is below: public List<AlbumDTO> findOrderBy (AlbumDTO obj, Order[] orderBy) throws Exception { Criteria criteria = HibernateUtil.getSession().createCriteria(AlbumDTO.class); criteria.add(Example.create(obj)); for (int i=0; i<orderBy.length; i++) { criteria.addOrder(orderBy[i]); } return criteria.list(); } Should this functionality work in Hibernate 3.0.5? Is it a bug? --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-05-27 13:41:34
|
The following issue has been updated: Updater: Stephen Earl (mailto:se...@ro...) Date: Fri, 27 May 2005 8:40 AM Changes: Attachment changed to orderIssue.zip --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/browse/HHH-545?page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-545 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-545 Summary: Hibernate doesn't seem to allow nested properties in an Order object. Type: Bug Status: Unassigned Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Versions: 3.0.5 Assignee: Reporter: Stephen Earl Created: Fri, 27 May 2005 8:17 AM Updated: Fri, 27 May 2005 8:40 AM Environment: Hibernate 3.0.5 JBoss 4.0.2 MySql 5.0.4 BETA Description: When passing "nested" properties in an Order expression a QueryException is thrown stating: could not resolve property: artist.name of: ami.server.dto.AlbumDTO. My mapping files are below: <album.hbm.xml> <hibernate-mapping package="ami.server.dto"> <class name="AlbumDTO" table="calliope.albums"> <id name="id" column="id"> <generator class="native"/> </id> <property name="title" column="title" not-null="true"/> <property name="upc" column="upc" not-null="true"/> <many-to-one name="artist" column="artist_id" class="ArtistDTO" fetch="join"/> </class> </hibernate-mapping> <artist.hbm.xml> <hibernate-mapping package="ami.server.dto"> <class name="ArtistDTO" table="calliope.artists"> <id name="id" column="id"> <generator class="native"/> </id> <property name="name" column="name" not-null="true"/> <property name="searchName" column="search_name" not-null="false"/> </class> </hibernate-mapping> The full source code of the method being called is below: public List<AlbumDTO> findOrderBy (AlbumDTO obj, Order[] orderBy) throws Exception { Criteria criteria = HibernateUtil.getSession().createCriteria(AlbumDTO.class); criteria.add(Example.create(obj)); for (int i=0; i<orderBy.length; i++) { criteria.addOrder(orderBy[i]); } return criteria.list(); } Should this functionality work in Hibernate 3.0.5? Is it a bug? --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-05-27 14:15:36
|
Message: The following issue has been closed. Resolver: Gavin King Date: Fri, 27 May 2005 9:14 AM Correct. Documentation is your friend. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-545 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-545 Summary: Hibernate doesn't seem to allow nested properties in an Order object. Type: Bug Status: Closed Priority: Major Resolution: REJECTED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Versions: 3.0.5 Assignee: Reporter: Stephen Earl Created: Fri, 27 May 2005 8:17 AM Updated: Fri, 27 May 2005 9:14 AM Environment: Hibernate 3.0.5 JBoss 4.0.2 MySql 5.0.4 BETA Description: When passing "nested" properties in an Order expression a QueryException is thrown stating: could not resolve property: artist.name of: ami.server.dto.AlbumDTO. My mapping files are below: <album.hbm.xml> <hibernate-mapping package="ami.server.dto"> <class name="AlbumDTO" table="calliope.albums"> <id name="id" column="id"> <generator class="native"/> </id> <property name="title" column="title" not-null="true"/> <property name="upc" column="upc" not-null="true"/> <many-to-one name="artist" column="artist_id" class="ArtistDTO" fetch="join"/> </class> </hibernate-mapping> <artist.hbm.xml> <hibernate-mapping package="ami.server.dto"> <class name="ArtistDTO" table="calliope.artists"> <id name="id" column="id"> <generator class="native"/> </id> <property name="name" column="name" not-null="true"/> <property name="searchName" column="search_name" not-null="false"/> </class> </hibernate-mapping> The full source code of the method being called is below: public List<AlbumDTO> findOrderBy (AlbumDTO obj, Order[] orderBy) throws Exception { Criteria criteria = HibernateUtil.getSession().createCriteria(AlbumDTO.class); criteria.add(Example.create(obj)); for (int i=0; i<orderBy.length; i++) { criteria.addOrder(orderBy[i]); } return criteria.list(); } Should this functionality work in Hibernate 3.0.5? Is it a bug? --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <no...@at...> - 2005-05-27 16:14:35
|
The following comment has been added to this issue: Author: Stephen Earl Created: Fri, 27 May 2005 11:12 AM Body: Gavin, First, can you point me to the place in the documentation that states that this is the behaviour to expect? Second, is this something that you would like to get working in the Hibernate product? I ask because I have some cycles to work on this issue and wonder if it would be useful functionality for Hibernate? --------------------------------------------------------------------- View this comment: http://opensource.atlassian.com/projects/hibernate/browse/HHH-545?page=comments#action_17967 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-545 Here is an overview of the issue: --------------------------------------------------------------------- Key: HHH-545 Summary: Hibernate doesn't seem to allow nested properties in an Order object. Type: Bug Status: Closed Priority: Major Resolution: REJECTED Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: Hibernate3 Components: core Versions: 3.0.5 Assignee: Reporter: Stephen Earl Created: Fri, 27 May 2005 8:17 AM Updated: Fri, 27 May 2005 11:12 AM Environment: Hibernate 3.0.5 JBoss 4.0.2 MySql 5.0.4 BETA Description: When passing "nested" properties in an Order expression a QueryException is thrown stating: could not resolve property: artist.name of: ami.server.dto.AlbumDTO. My mapping files are below: <album.hbm.xml> <hibernate-mapping package="ami.server.dto"> <class name="AlbumDTO" table="calliope.albums"> <id name="id" column="id"> <generator class="native"/> </id> <property name="title" column="title" not-null="true"/> <property name="upc" column="upc" not-null="true"/> <many-to-one name="artist" column="artist_id" class="ArtistDTO" fetch="join"/> </class> </hibernate-mapping> <artist.hbm.xml> <hibernate-mapping package="ami.server.dto"> <class name="ArtistDTO" table="calliope.artists"> <id name="id" column="id"> <generator class="native"/> </id> <property name="name" column="name" not-null="true"/> <property name="searchName" column="search_name" not-null="false"/> </class> </hibernate-mapping> The full source code of the method being called is below: public List<AlbumDTO> findOrderBy (AlbumDTO obj, Order[] orderBy) throws Exception { Criteria criteria = HibernateUtil.getSession().createCriteria(AlbumDTO.class); criteria.add(Example.create(obj)); for (int i=0; i<orderBy.length; i++) { criteria.addOrder(orderBy[i]); } return criteria.list(); } Should this functionality work in Hibernate 3.0.5? Is it a bug? --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: Eric C. (JIRA) <no...@at...> - 2006-07-04 18:23:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-545?page=comments#action_23533 ] Eric Coupal commented on HHH-545: --------------------------------- Actually, i also need a workaround fort that, i tried to get the sql query string to pipe the orderby but getQueryString doesnt exist in hibernate3. > Hibernate doesn't seem to allow nested properties in an Order object. > --------------------------------------------------------------------- > > Key: HHH-545 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-545 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.0.5 > Environment: Hibernate 3.0.5 > JBoss 4.0.2 > MySql 5.0.4 BETA > Reporter: Stephen Earl > Attachments: orderIssue.zip > > > When passing "nested" properties in an Order expression a QueryException is thrown stating: could not resolve property: artist.name of: ami.server.dto.AlbumDTO. > My mapping files are below: > <album.hbm.xml> > <hibernate-mapping package="ami.server.dto"> > <class name="AlbumDTO" table="calliope.albums"> > <id name="id" column="id"> > <generator class="native"/> > </id> > <property name="title" column="title" not-null="true"/> > <property name="upc" column="upc" not-null="true"/> > <many-to-one name="artist" column="artist_id" class="ArtistDTO" fetch="join"/> > </class> > </hibernate-mapping> > <artist.hbm.xml> > <hibernate-mapping package="ami.server.dto"> > <class name="ArtistDTO" table="calliope.artists"> > <id name="id" column="id"> > <generator class="native"/> > </id> > <property name="name" column="name" not-null="true"/> > <property name="searchName" column="search_name" not-null="false"/> > </class> > </hibernate-mapping> > The full source code of the method being called is below: > public List<AlbumDTO> findOrderBy (AlbumDTO obj, Order[] orderBy) throws Exception { > Criteria criteria = HibernateUtil.getSession().createCriteria(AlbumDTO.class); > criteria.add(Example.create(obj)); > for (int i=0; i<orderBy.length; i++) { > criteria.addOrder(orderBy[i]); > } > return criteria.list(); > } > Should this functionality work in Hibernate 3.0.5? Is it a bug? -- 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 |