Inheritance in QueryDSL

94 views
Skip to first unread message

venkates...@csgsol.com

unread,
Jan 18, 2014, 3:57:23 AM1/18/14
to quer...@googlegroups.com
Hi,
  Can some body suggest how to query the Inhertance data. I have classes like this.
  Class Fruit {
     String color;
  }
  Class Apple extends Fruit {
     String shape;
 }
  Class Mango extends Fruit {
   String weight;
}
  Class Bag {
    Set<Fruit>
 }
 I want to query bag which contains mangos which is having weight 100gm and apples shape with round.
At the end i need Bag object with set of fruits , internally fruit instances should be apple and mangos.

Please suggest how to do this in QueryDSL.

timowest

unread,
Jan 18, 2014, 1:54:21 PM1/18/14
to quer...@googlegroups.com
Hi.

Could you provide more details? At least the used annotations for the types and properties.

Otherwise it would be too abstract and not reflect your case properly.

Timo

venkates...@csgsol.com

unread,
Jul 18, 2016, 12:00:12 PM7/18/16
to Querydsl
Is there any solution for this problem in querydsl?
Reply all
Reply to author
Forward
0 new messages