I have a big entity with lots of data which I don't need to send to my
client. Only the primary key and a string should be delivered. All in all I
have to send 60000 entities. Now I have two possibilities:

1) I create a simple DTO with just the two required fields and fill it up
with JPA's constructor expression.
2) I use a fetch group which defines only the two required attributes on my
big entity. But all other attributes are initialized with default values I
guess and transported via the network as well.

What is best practice? What would you recommend? Maybe there are other
solutions?
Thanks for your input!

--
View this message in context: 
http://openjpa.208410.n2.nabble.com/Best-practice-Using-fetch-groups-or-a-simple-DTO-tp6598057p6598057.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to