facebook

Hibenate reverse engineering

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

    Douglas M Hurst
    Participant

    Does 7.5 allow for

    <generator class=”assigned” />

    on auto-increment fields to be set to…

    <generator class=”increment” />

    … in the RE wizard?

    For MySQL with integer auto-increment fields, assigned and identity do not seem to work with auto-increment id fields.

    On initial RE, that means, for me, 10 ???.hbm.xml files have to be updated. Also, the constructor and super in the ????.java file must also have the id field removed.

    After the initial RE, it’s usually a matter of 1 or 2 changes such as when a field is added. Even so, it’s easy to forget making the manual change and then you have to go back and do it when you encounter an error in testing.

    I know, in the past, there was a file that could be changed so that increment was generated instead of identity or assigned. My main reason for not wanting to do that is that if I upgrade to a newer version of MyEclipse, I have to make that change again.

    #302110 Reply

    support-joy
    Member

    douglasmhurst,

    Does 7.5 allow for

    <generator class=”assigned” />

    on auto-increment fields

    MyEclipse7.5 supports <generator class=”assigned” /> or <generator class=”identity” /> on auto-increment fields.

    Let me clarify that I tried to replicate your problem with the below mentioned steps.
    1) created one table in MYSQL with the following DDL

    create table test (id int(8) unsigned primary key unique auto_increment, name text);

    2) Created project with Hibernate Capabilities.

    3) I am able to work with developed application although I assigned “assigned” or “identity” as generator class in ???.hbm.xml(Hibernate Mapping) file.

    I am unable to reproduce your problem from my end. I would suggest you to create a sample project and mail to
    support@genuitec.com. Please add ATTN: JOY in the subject and refer to this thread.This will help us to reproduce this issue internally and quickly work on resolution.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Hibenate reverse engineering

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