I'm trying to write nativeQuery which should returns result in 2 enitities:
A & B. There are a lot of fields  in each entity.
@SqlResultSetMapping(name="BLABLABLA",
      [EMAIL PROTECTED](entityClass=A.class,
                              [EMAIL PROTECTED](name="aid",
                                                   column="aid")}
                ),
                @EntityResult(entityClass=B.class,
                              [EMAIL PROTECTED](name="bid",
                                                   column="bid")}
                                      )})
My questions are:
should I put all fields in @FieldResult anotations, if I am interested in only 
in primary keys of 2 entities?
If I want receive additional fields - Have I to add these fields to 
@FieldResult?
And now I have trouble with my native query:
Entity A have realtion with another entity C (type one2one, PK of another 
entity are saved in A table) and when query is executed - the Hibernate throws 
errors, that it cannot read the property C. What is the problem?


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048386#4048386

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048386
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to