[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4689) Make sure @OrderBy supports dotted notation to point to embedded properties
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Thu Jan 7 08:13:33 EST 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35131#action_35131 ]
Emmanuel Bernard commented on HHH-4689:
---------------------------------------
hum no you can't do that.
I looked at the code a bit, it seems that your algo is indeed part of the findPropertyByName algo
**
StringTokenizer st = new StringTokenizer( propertyName, ".", false );
while ( st.hasMoreElements() ) {
String element = (String) st.nextElement();
if ( property == null ) {
property = associatedClass.getProperty( element );
}
else {
if ( !property.isComposite() ) return null;
property = ( (Component) property.getValue() ).getProperty( element );
}
}
**
so extract this method from findPropertyByName, host it on BinderHelper and use it for your case.
> Make sure @OrderBy supports dotted notation to point to embedded properties
> ---------------------------------------------------------------------------
>
> Key: HHH-4689
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4689
> Project: Hibernate Core
> Issue Type: Sub-task
> Components: annotations
> Reporter: Emmanuel Bernard
> Assignee: Scott Marlow
> Attachments: CollectionBinder.patch
>
>
--
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