Created
February 7, 2012 15:10
-
-
Save edalquist/1760141 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Query using: criteria.add( Restrictions.naturalId().set( "ssn", "1234" ).set( "state", france ) ); | |
select | |
this_.id as id0_1_, | |
this_.firstname as firstname0_1_, | |
this_.lastname as lastname0_1_, | |
this_.ssn as ssn0_1_, | |
this_.state_id as state5_0_1_, | |
state2_.id as id1_0_, | |
state2_.name as name1_0_ | |
from Citizen this_ | |
left outer join State state2_ on this_.state_id=state2_.id | |
where (this_.ssn=? and this_.state_id=?) | |
## Query using: criteria.add( Restrictions.naturalId().set( "ssn", "1234" ) ); | |
select | |
this_.id as id0_1_, | |
this_.firstname as firstname0_1_, | |
this_.lastname as lastname0_1_, | |
this_.ssn as ssn0_1_, | |
this_.state_id as state5_0_1_, | |
state2_.id as id1_0_, | |
state2_.name as name1_0_ | |
from Citizen this_ | |
left outer join State state2_ on this_.state_id=state2_.id | |
where (this_.ssn=?) | |
## Query using: criteria.add( Restrictions.naturalId().set( "ssn", "1234" ).set( "lastname", france ) ); | |
select | |
this_.id as id0_1_, | |
this_.firstname as firstname0_1_, | |
this_.lastname as lastname0_1_, | |
this_.ssn as ssn0_1_, | |
this_.state_id as state5_0_1_, | |
state2_.id as id1_0_, | |
state2_.name as name1_0_ | |
from Citizen this_ | |
left outer join State state2_ on this_.state_id=state2_.id | |
where (this_.ssn=? and this_.lastname=?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment