Guest User

Untitled

a guest
Jun 18th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. select * from publisher
  2. where id not in (
  3. select publisher_id from record
  4. where year = 2008 and month = 4
  5. )
  6.  
  7. DetachedCriteria c = DetachedCriteria.For<Record>()
  8. .SetProjection(Projections.Property("Publisher"))
  9. .Add(Restrictions.Eq("Year", 2008))
  10. .Add(Restrictions.Eq("Month", 4));
  11. session.CreateCriteria(typeof(Publisher))
  12. .Add(Subqueries.PropertyNotIn("Id", c))
  13. .List();
Add Comment
Please, Sign In to add comment