0

my question is similar to this question how to write Hibernate Criteria to take nested objects by Projection List?

but with tiny differnce. In fact my classes is similar to

  class Person {
    private Long id;
    private String name;
    private List<Car> cars; // differnce 
    // getters and setters
  }
   

how transformer to list of objects?

Community
  • 1
  • 1
Hadi J
  • 16,989
  • 4
  • 36
  • 62
  • Why do you have a list of `String`? Shouldn't that be a list of `Car`? That's no object relation ;) – Jan Aug 25 '15 at 06:44
  • @Jan yes that is right:) – Hadi J Aug 25 '15 at 06:47
  • Ok :) just to clarify your question a bit more: You want to receive a list of cars? Does [this](http://stackoverflow.com/questions/11852230/adding-a-projection-to-a-list-in-hibernate) help? – Jan Aug 25 '15 at 06:57

0 Answers0