dto « Map « JPA Q&A





1. Map partial DTO back to Domain object    stackoverflow.com

We have a flex client which we send DTO objects. This is done since our domain object contain a lot of data and the client mostly views just a small portion of ...

2. Mapping Hibernate domain entities to DTOs    coderanch.com

I have some domain entities that are mapped via hibernate. These entities contain way too much data to send over the wire, so I want to convert them to lightweight DTOs, which I will then send over. Some of the DTOs will contain other DTOs, which also correspond to a domain entity that is mapped via hibernate. Therefore, what is the ...

3. JPA - Parent Children - Dto to Entity Persistence    coderanch.com

Okay, I am quite confused on how I am suppose to deal with persisting a new or changed child of a parent child relationship or one to many relationship. In the past, I have just saved the child by converting the child to an entity and then do a find on the id of the child. If update then merge if ...

4. Need help mapping the a SQL-Query DTO class.    forum.hibernate.org

I am successfully using Hibernate to call a stored procedure defined in ta config file as follows: { call DETAILS_PKG.Score ?, :key, :date ) } The java sniplet: hibernateSession = HibernateUtil.openSession(); Query q = hibernateSession.getNamedQuery("GetScore"); q.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP); q.setReadOnly(true); Object res = q.uniqueResult(); Yields the stored procedure result set as a map, the map keys are B1, B2, B3, ...

5. Map Query to dto    forum.hibernate.org

Can you make your ques a bit clearer. May be with an eg. Do you mean that: "select prop1, prop2 from ClassA where prop3=:someValue" is your query and you want this HQL to return an object contatining prop1 and prop2 instead. In that case you can write the HQL as: select new TempObject(prop1, prop2) from ClassA where prop3=:someValue Make sure TempObject ...