facebook

Autogenreation of hibernate files

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

    oliverdb
    Member

    Hey all

    I just created a neat set of classes using the wizard in myEclipse. This resulted in quite a few classes and quite a few classes for my many to many relationships. I do not realy want my OO side to look like this, so

    Would it be an idea to write an abstraction over my autogenerated classes. So the relationship is simplified?

    How about Sets and Lists. For instance I have an Project table and thus a project class. A project has one or more Customers, defined by a Customer_owns_project relations ship between table Customer and table Projects. Because Customer_owns_project is a table it becomes a class in itself. I would like that a project has a set of Customers.How do I solve this the best way, without schrewing up the syncronisation

    #222380 Reply

    support-jeff
    Member

    Oliver –

    Ideally, you would not generate a mapping for the CUSTOMER_OWNS_PROJECT table – it is a many-to-many relationship table that should be reflected in your mappings as a collection and many-to-many mapping (unless it really does have important business state). Unfortunately, generation of m2m mappings is not supported in the tool yet. Coming soon to a release near you.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Autogenreation of hibernate files

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