Hibernate to get a list of primitive integers for a subproblem
3 answers
well it turned out to be as simple as something like the following from the url https://www.hibernate.org/hib_docs/nhibernate/html/queryhql.html which was actually one of the first results I found when searching on google but i was concerned that it might be specific NHibernate
from Eg.DomesticCat as cat where cat.Name not in (
select name.NickName from Eg.Name as name )
+2
a source to share
Don't know how to use the hibernate engine itself, I think it will depend on how you mapped the model objects without waiting for the mapping, you can go through the hibernate session object and use standard SQL;
session.createSQLQuery("select idCol from someTable where someId not in (
select someId from anotherTable)");
Then use the list () method in the request and use autoboxing on the primtive int array.
0
a source to share