You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fixed code is as follows:
getPathInfo(String){
...
else if ( type.isComponentType() ) {
if (!tokens.hasMoreTokens()) {
throw new QueryException("Criteria objects cannot be created directly on components. Create a criteria on owning entity and use a dotted property to access component property: "+path);
} else {
componentPath += '.';
}
}
}
This bug was originally reported to hiberante:
https://hibernate.atlassian.net/browse/HHH-3646
The buggy code of hibernate is:
getPathInfo(String){
...
else if ( type.isComponentType() ) {
componentPath += '.';
}
}
The fixed code is as follows:
getPathInfo(String){
...
else if ( type.isComponentType() ) {
if (!tokens.hasMoreTokens()) {
throw new QueryException("Criteria objects cannot be created directly on components. Create a criteria on owning entity and use a dotted property to access component property: "+path);
} else {
componentPath += '.';
}
}
}
The commit is hibernate/hibernate-orm@90fdca9
In nhibernate, the latest code is still identical to the buggy code:
private ICriteriaInfoProvider GetPathInfo(string path, ICriteriaInfoProvider rootProvider){
...
else if (type.IsComponentType)
{
componentPath += '.';
}
}
The text was updated successfully, but these errors were encountered: