pattern « DAO « JPA Q&A





1. I found JPA, or alike, don't encourage DAO pattern    stackoverflow.com

I found JPA, or alike, don't encourage DAO pattern. I don't know, but I feel like that, especially with server managed JTA managers. After adequate hands-on using DAO pattern, I started designing ...

2. Hibernate in a DAO pattern & lazy loading    coderanch.com

In a small, non-web test application, I have 2 classes : Father and Child. Father is stored in the FATHER table, the children are in the CHILD one. And from the Java POV, the Father class contains a Set of Child(ren) and a getChildren() method to retrieve it. Nothing complicated here I use Hibernate to persist those data. First test : ...

3. Hibernate in DAO pattern    forum.hibernate.org

Hi All, I'm using hibernate and have started writing my DAO classes. Is it allowed / a good idea to have a DAO class do some calculations and other lookups in order to generate the top level data needed by the caller, or should Hibernate DAOs just be wrappers around basic CRUD functionality only? TY

4. Hibernate and DAO Pattern    forum.hibernate.org

Fisrt, I wonder if it is possible to use hibernate with the DAO Pattern. Second, I use servlets as client. Does servlets must directly use DAO objects that encapsulate RDB's access or must i use a layer between servlet and DAO that will act as Business layer. I notice that i don't want to use EJB. Thanks

5. DAO pattern and granularity    forum.hibernate.org

Hello! I would like to abstract from the hibernate dependent code by using the DAO pattern. As I understand the pattern, there should be one DAO for each business object. This DAO implements CRUD operations which give access to the data of the business object. By using this approach, however, a scalar query that returns properties from several classes cannot (efficiently) ...

6. Lazy load and DAO pattern..    forum.hibernate.org

Newbie Joined: Fri Aug 06, 2004 12:23 am Posts: 3 I've implemented Session in View pattern to enable lazy load in DAO pattern. Then, some part, the lazy load is very ok, but at few other, i catch this error at the bottom of the display page : ..... net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection .... Caused by: java.lang.NullPointerException at ...

7. "migration path" from DAO pattern? "shared co    forum.hibernate.org

Hibernate version: any / none yet / current :-) Code between sessionFactory.openSession() and session.close(): (yes, that's what I need to figure out... ) Name and version of the database you are using: MySQL 4 / Oracle Hi everybody, I've just started evaluating Hibernate, done some tutorials, read some documentation and everything seems to work just fine so far :-))). However, I ...

8. Routine to check record duplication in DAO pattern    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hi all, I've just read HIA, after finishing Chapter 8. (Writing Hibernate Applications) I have a question here. Before persisting a domain model to DB I need to make sure that the record does not exist yet in the database by comparing ID from domain model to the one in DB. ...

9. Using DAO pattern    forum.hibernate.org





10. Hibernate + DAO Pattern    forum.hibernate.org

I've been reading up a little on the DAO pattern, and i believe i have a fair grasp of what is being written about this pattern on the Hibernate site (https://www.hibernate.org/328.html). However, one of the things that is being written is that DAO's should never deal with transactions and sessions. How do i then handle transactions? Say that i obtain a ...

11. DAO pattern in a Hibernate    forum.hibernate.org