Skip to content

Instantly share code, notes, and snippets.

@appikonda
Created May 19, 2015 18:11
Show Gist options
  • Save appikonda/11c9793b1a690efaed46 to your computer and use it in GitHub Desktop.
Save appikonda/11c9793b1a690efaed46 to your computer and use it in GitHub Desktop.
HQL to SQL
select * from clientAccessLevel as CAL
inner join client as client
on CAL.client_id = client.id
inner join domain as domain
on CAL.domain_id = domain.id
inner join AccessLevelReference as accessLevelReference
on VAL.accessLevelReferenceId= accessLevelReference.Id
where client.isDelete = false
and domain.id = ?
and accessLevelReference.accessLevel != "give the constant"
and (client.hostname = ? or client.ipAddress = ?)
for read only;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment