Immediate help needed please.
I want to select list of composite element
In main object 'A' I have
/**
* @hibernate.list
* table="tab_b"
* @hibernate.collection-composite-element
* class="com.db.B"
* @hibernate.collection-index
* column="idx"
* @hibernate.collection-key
* column="b_id"
*/
Now I am trying simply
"SELECT b from A a LEFT JOIN a.B b where a.id=?"
But It does not works.
javax.servlet.ServletException: could not resolve property: id of: com.db.B
Then I try for
"SELECT new com.db.B( b.lessAmount, b.lessString, "
+ " sllBill ) "
+ " FROM A a LEFT JOIN a.B b "
+ " LEFT JOIN a.bill sllBill "
+ " WHERE a.id = ? ";
But Same problem
javax.servlet.ServletException: could not resolve property: id of: com.db.B
"SELECT new com.db.B( b.lessAmount, b.lessString, "
+ " b.bill ) "
+ " FROM A a LEFT JOIN a.B b "
+ " WHERE a.id = ? ";
It gives no error but give empty list
What should be the way?
Please help me
_________________ nahid
Application Developer
DSi (www.dsinv.com)
|