facebook

Hibernate Mappings

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

    smcnam
    Member

    When mapping a view (Oracle 8i) using the Create Hibernate Mapping wizard, ALL of the fields are being added to a composite key. I only want one field as my key field…how do I stop it from auto-generating the composite key?

    #247911 Reply

    Haris Peco
    Member

    smcnam ,

    You can’t do it, for now (except editing hbm.xml after generation) – view can’t have PK(or unique key) and we can’t decide what property can be included.Hibernate mapping request id and ‘all columns’ is logical solution.ID is important in hibernate and it have to be unique – we can be sure that Id with all columns is unique (rows/tuple are unique in relational theory)

    What is your reason that ‘one’ property be ID ? It is possible that we add this features, but I don’t sure that it’s necessary

    Best

    #247913 Reply

    smcnam
    Member

    In the case of my view, the main underlying table has one unique id field generated for each row. This field is available in all of my views that reference this table. In the case of hibernate, it just makes the code/mappings simpler…I just have one class. I can see why you would make the entire row the id, but it would be nice to have the option of selecting my id field in the wizard so I don’t have to edit every class and mappings afterward.

    Thanks.

    #247915 Reply

    Haris Peco
    Member

    smcnam ,

    I file PR for your request and I hope that we will add in future releases

    Thanks

    #247947 Reply

    mcoffin
    Member

    Hopefull, this gets into the next release. I couldn’t figure what was happening at first till I saw this thread. This is very annoying.
    [/quote]

    #247952 Reply

    Haris Peco
    Member

    mcoffin,

    We fixed a lot bugs and added some enhancements in version 4.1.1 RE engine and we can add exotic features, now

    Sorry for the inconvenience

    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Hibernate Mappings

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