criteria - Controlling Hibernate's generated subselect -


Consider the following three hibernate organizations:

  public class carriage {@OneToMany (fetch ======================= ================================================== ============  

Consider the following criteria:

  criteria = getSession (). CreateCriteria (Car.class); & Lt; Cars & gt; Cars = criteria List (); (Car Car: Cars) {Start Hibernate.in (Car Gate Vahls ()); }  

Is there a way to control the subscribed query that will arise? In particular, I would like to be involved in the sub-genre so that hubbaps can also be obtained when the wheels are achieved. It can definitely be completed by replacing FetchType in EAGER, but I need some more ad hoc - the basis of the question On a query on

As the code currently I will need to generate another selection to get Hubcaps.

Yes, you can use these parameters but I do not remember how this has been done. Look for joining the criteria, though I would recommend using HQL, but the criteria is far more readable:

  Select from C. See c.wheels where ...  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -