Hi guys.
Before opening a JIRA I just want to make sure that there's a bug with @OrderBy on embedded fields .
Code:
@OneToMany(cascade = CascadeType.ALL, mappedBy = "category")
@OrderBy("publishInfo.position")
public Set<Category> getChildren()
{
return children;
}
Where publishInfo is an embedded object inside the Category object.
The stack trace :
Code:
Caused by: java.lang.NullPointerException
at org.hibernate.cfg.annotations.CollectionBinder.buildOrderByClauseFromHql(CollectionBinder.java:851)
at org.hibernate.cfg.annotations.CollectionBinder.bindOneToManySecondPass(CollectionBinder.java:608)
at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:563)
at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:517)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:316)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
Does anyone meet already this problem ?
Cheers