one to many - Construct JPA query for a OneToMany relation -


i've 2 entities

class {     @onetomany(mappedby="a")     private list<b> bs; }  class b {      @manytoone     private a;      private string name; } 

1) construct query says a's have @ least 1 b name ="mohamede1945"

2) construct query says a's don't have b name = "mohamede1945"

could me?

you can use , constructs filter subquery. like

1. aentity 'mohamede1945' = (select bentity.name aentity.bs bentity)  2. aentity 'mohamede1945' <> (select bentity.name aentity.bs bentity) 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -