facebook

Hibernate Programming

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #269785 Reply

    I’m learning Hibernate and myEcIDE is definately helping. I apologize if this more of general Java questions, but what the heck….

    The Hibernate tool makes DAO classes and that’s nice, but I’m thinking that I would prefer to make the DAO classes “plurals” of the object the access and then to make all the methods static. So say I have a class named ‘Request’ and I wanna Hibernate all over its bad self. Then I could write:

    Request r = Requests.findByID(“1234”);
    r.myVar = “newValue”;
    Requests.save(r);

    What do you think?

    Thanks!
    And keep up the great work.

    #269798 Reply

    Riyad Kalla
    Member

    This sounds more like a feature request to control the naming of the DAO’s, so instead of “DAO” suffix, you could just have an “s” suffix… I think it makes perfect sense.

    The only reason we do DAO is because it’s a relatively wide-spread JEE standard, and people immediately know what the classes do seeing them. But I think we could open this up to customization. I’ll file that feature request.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Hibernate Programming

You must be logged in to post in the forum log in