[hibernate-issues] [JIRA] (HHH-13313) Legacy Criteria API: could not resolve Property on One-To-One @PrimaryJoinColumn with hibernate

Gail Badner (JIRA) jira at hibernate.atlassian.net
Mon Feb 24 15:18:52 EST 2020


Gail Badner ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Aabbef6b0-cce3-4556-9748-b721becb9c9a ) *commented* on HHH-13313 ( https://hibernate.atlassian.net/browse/HHH-13313?atlOrigin=eyJpIjoiNzU2YzI4Y2QzYmI0NGMzMmIyODA2YWYxNmE0NTFlZjYiLCJwIjoiaiJ9 )

Re: Legacy Criteria API: could not resolve Property on One-To-One @PrimaryJoinColumn with hibernate ( https://hibernate.atlassian.net/browse/HHH-13313?atlOrigin=eyJpIjoiNzU2YzI4Y2QzYmI0NGMzMmIyODA2YWYxNmE0NTFlZjYiLCJwIjoiaiJ9 )

A workaround is to use an alias, as in:

     List results = session.createCriteria( Foo.class )
             .createAlias( "bar" , "b" )
             .add( Restrictions.eq( "b.id" , 1l) )
             .list();

( https://hibernate.atlassian.net/browse/HHH-13313#add-comment?atlOrigin=eyJpIjoiNzU2YzI4Y2QzYmI0NGMzMmIyODA2YWYxNmE0NTFlZjYiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-13313#add-comment?atlOrigin=eyJpIjoiNzU2YzI4Y2QzYmI0NGMzMmIyODA2YWYxNmE0NTFlZjYiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100121- sha1:96a3924 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200224/485353c7/attachment.html 


More information about the hibernate-issues mailing list