On Thu, Apr 16, 2009 at 12:51 AM, Pinaki Poddar <ppod...@apache.org> wrote:
> > Hi, > Or may be with JPA, DAO is no more a useful pattern? I've never used the DAO pattern. My homegrown web application framework I would say is a little "too close to the metal". In trying to learn JPA, I see this pattern of MyEntity and MyEntityDAO. I started following this but found it frustrating that since MyEntityDAO is not an @Entity, I can't put @NamedQueries in it. My @NamedQueries are in MyEntity, so why not put findMyEntity() right on MyEntity? This keeps the method and the query in the same class. The only problem I have with it is that NamedQueries can contain complex business logic which should not be mixed with storage of data. Comments? -- Daryl Stultz _____________________________________ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com mailto:da...@6degrees.com