1

I have 2 tables and 2 beans, these beans mapped with tables.
Table - Bean :
m_student - MStudentBean.java
m_book - MBook.java

Now, I have to display data like
student_id , student_name , student_contact + book_nums , book_names.

For this I have to join both tables and then display the data. I want to know that how to return data in views -
I can make new bean and then populate data in bean using join query & return this bean for display. Is it good idea to make new bean here ?
OR
I can make list where based on student_id populate both tables data in respective bean and then add both bean in list and then return this list for display.
How to do this in playframework.

4

1 回答 1

0

上述问题的有用链接 -

http://www.java2s.com/Code/Java/JPA/OneToManyMappedBy.htm

http://viralpatel.net/blogs/hibernate-one-to-many-annotation-tutorial/

于 2012-08-03T13:51:08.920 回答