-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Sorting by columns from embedded entity - Criteria
PostPosted: Thu Apr 02, 2009 5:22 am 
Newbie

Joined: Tue Mar 31, 2009 6:48 am
Posts: 5
Hi,

Class Client {
@Embedded
Address address;
}

Class Address{
@Column(name="STREET")
String street;
}

There is a problem in sorting query results by street. I know that when I sort by columns in referenced entities i have to add criteria for them. And that works fine. But there is a problem, when referenced entity is not separate column - STREET column is part of CLIENT table and there is no ADDRESS table.

Here's what hibernate says: could not resolve property: street of: cbki.client.bo.Client

Just like hibernate wouldn't recognize it's embedded.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.