Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6817157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:00:51+00:00 2026-05-26T21:00:51+00:00

I have a design question about the use of Hibernate annotations and DAO pattern.

  • 0

I have a design question about the use of Hibernate annotations and DAO pattern. The DTO are supposed to represent entities of the data model. The DAOs are interfaces that define operations on these DTOs. The DAOs implementations are classes that implement the DAO interfaces, and implement the operations defined by these interfaces (for example using Hibernate/MySQL).
My question is : How can I use Hibernate annotations in this case? If I annotate directly the DTO, I couple my DTO with the Hibernate framework which is a bad practice I think.

Maybe it’s a simple question but the problem is interesting.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:00:52+00:00Added an answer on May 26, 2026 at 9:00 pm

    It’s a matter or supposed “independance” vs. ease of use. Either you choose to use Hibernate or another JPA engine, and you indeed need to have annotations on your entities and have the hibernate jars in your classpath to use them. Or you choose to be completely independant of JPA/Hibernate, but you have to implement the whole persistence yourself.

    My opinion is that sacrificing the ease of use and productivity gains offered by JPA just to avoid some jars in the classpath is a bad choice. But YMMV.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about best practices with the Module Design Pattern. The code
I have a question about design winforms. Should I use, or not, group boxes
I have posted a question about multilanguage database design here, [] What are best
I am trying to design an entity model using JPA2.0 via hibernate. I have
Have a question about the design/usage of asp.net mvc here. In the html helper
I have a question about iPhone app design approach... I have in mind to
I have a naive question about OOP design patterns. This is over-architecture, but I
I have a question about the design of an application I'm working on. I
Hi: I have a question about how to design and map object class in
I have a design question/technical question about my iPhone app. I have a pretty

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.