Answer the question
In order to leave comments, you need to log in
How to select custom field from Hibernate?
Good time of the day. Interested in one question about the ORM Hibernate:
How can I pull out an arbitrary field goodField?
Let's say I have a query like this
select mytable.*, (select * from mytable2) as goodField from mytable;
(List<MyTable>) session.createSQLQuery("select mytable.*, (select * from mytable2) as goodField from mytable").addEntity(MyTable.class).list();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question