Joined: Mon Nov 06, 2006 4:14 pm Posts: 1
|
This is the code:
@Entity class A{some fields and methods}
@Entity class B extends A{
String _name;
String getName(){...}
}
@Entity class C extends A{
ArrayList<B> _someB;
addB(B b){...}
}
class DaoForC{
List<C> findByB(String name){
//return all C that have a B in _someB
//with B._name=name
Query q = session.createQuery(???);
return q.list();
}
}
Question 1:
Any suggestions how to fill "???"?
Question 2:
What would be different in Answer to Question1, if class B does not extend A?
Thanks!
|
|