In very simple cases it is possible to transfer JPA entities but it is not a good practice to do so.
For a remote service it makes sense to have a separate DTO. Often you can also tailor the DTO to the use case of the remote service. Like in the service facade pattern. Christian Am Mo., 23. Juli 2018 um 14:53 Uhr schrieb ceugster < [email protected]>: > So if I get it right, I have theoretically two classes for Car, an entity > Car > and a DTO Car. Both have same fields and getters/setters. and as next step > I > use one class (instead of interface) car, that is used for both? Or is it > better to separate each implementation (jpa entity and data transfer > object)? > > > > -- > Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html > -- -- Christian Schneider http://www.liquid-reality.de Computer Scientist http://www.adobe.com
