java - Fetch an object without its relationships/children using Hibernate/JPA -


i using hibernate/jpa , need fetch object without relationship/children how can that? questions not use lazy or eager strategy because in both case children attached object, initializate or not.

ex: have obj onetomany relationship b. want fetch list of without b attached it.

thanks

you can use dto pattern desirable in restfull services. sure have fields need , can use spring modelmapper convert entity dto.

http://www.baeldung.com/entity-to-and-from-dto-for-a-java-spring-application

..or implement builder (lombok) or populator/converter pattern


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -