facebook

hibernate mapping is all lowercase. Capitalization is ignore

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

    mxnmatch
    Member

    When I create a hibernate mapping file from a table in the MyEclipse Database Explorer, it seems to just ignore all capitalization.

    For instance, take a look at the following. The value for the “table” parameter clearly has the proper capitalization. But, the name has forced the name to lowercase except the first letter.

    The same is true of all “column” parameters. They’re all capitalized correctly, but the corresponding “name” is lowercased.

    <class name=”Customobjdatameta” table=”CustomObjDataMeta”>
    <id name=”id” column=”id” type=”java.lang.Long”>
    <generator class=”native”/>
    </id>

    <property name=”versionid” column=”versionId” type=”java.lang.Long” />
    <property name=”versionof” column=”versionOf” type=”java.lang.Long” />
    <property name=”cobj” column=”cobj” type=”java.lang.Long” not-null=”true” />
    <property name=”datatype” column=”dataType” type=”java.lang.Long” not-null=”true” />
    <property name=”dataix” column=”dataIx” type=”java.lang.Long” not-null=”true” />
    <property name=”meta1″ column=”meta1″ type=”java.lang.Long” />
    <property name=”meta2″ column=”meta2″ type=”java.lang.Long” />
    <property name=”meta3″ column=”meta3″ type=”java.lang.Long” />
    <property name=”meta4″ column=”meta4″ type=”java.lang.Long” />
    <property name=”meta5″ column=”meta5″ type=”java.lang.Long” />
    <property name=”meta6″ column=”meta6″ type=”java.lang.Long” />
    <property name=”meta7″ column=”meta7″ type=”java.lang.Long” />
    <property name=”meta8″ column=”meta8″ type=”java.lang.Long” />
    <property name=”meta9″ column=”meta9″ type=”java.lang.Long” />
    <property name=”meta10″ column=”meta10″ type=”java.lang.Long” />
    </class>

    I’m using MyEclipseIDE 3.8.3 and MySQL 4.1.8-nt.

    #222445 Reply

    mxnmatch
    Member

    Incidentally, when I clicked “preview” it kept sending me to the myeclipseide.cmo main page. So I just submitted the message and it worked fine. Dunno what happened there.

    #222567 Reply

    mxnmatch
    Member

    Any updates on hibernate integration?

    Should I just use a different plugin for the time being?

    Does anyone have any recommendations for a hibernate plugin?

    #222568 Reply

    Riyad Kalla
    Member

    Right now capitalization is keyed off of the more standard underscore separator:
    user_name == userName
    my_dog_skip == myDogSkip

    Reading proper capitalization from the DB directly is on our TODO list to get finished here soon, sorry you are running into this problem. You might try Hibernate Synchronizer and see if that plugin fits your needs better w.r.t. to Hibernate mapping.

    #222573 Reply

    mxnmatch
    Member

    Ok, but it seems weird to me. You already seem to be reading the proper capitalization from the db. The table and column attributes are correctly capitalized in the hbm files you generate. It’s just that they are forced to lowercase in the name attribute and when creating the java files.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: hibernate mapping is all lowercase. Capitalization is ignore

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