[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.technology.jsr220-orm] Re: Id field DDL generation, embeddable superclass

Hi Jim,

On problem #1
On MySql auto-inc implies PK, setting it to PK remove auto-inc.
I have committed a patch for RDB code. Latest JSR220-ORM code has a workaround for rdb bug.


On problem #2
This has been fixed in CVS. https://bugs.eclipse.org/bugs/show_bug.cgi?id=110473
Sorry about the bug.


Dirk le Roux

Robert Greene wrote:

Hi Jim,

I will talk to Dirk who is working on the WTP/DTP RDB code about Problem #1,
but I believe you should be able to specify both....  The Primary Key
designation is essentially defining the index type and the auto-increment
designation is specifying how the key value is generated.

On problem #2 - It should not be generating a table.  We had a similar bug
with embedded classes that we fixed recently.  We will take a look at this.

Thanks,
-Robert

Robert Greene
JSR220-ORM team lead
rgreene@xxxxxxxxxxx


"Jim Schneider" <jschneider@xxxxxxxxxxxxxxxx> wrote in message
news:2721705bdf9b66e64e49bc787d9addda$1@xxxxxxxxxxxxxxxxxx
Environment:
Windows XP,
MySQL 5.0.x (using 4.0/1 in orm),
orm 0.9.4,
eclipse 3.1.1
jboss 4.0.3SP1
java 1.5.xxx

Problem #1:
Trying to get an ID field to generate MySQL DDL that has auto-increment
AND as primary key field. I've tried AUTO, IDENTITY, and SEQUENCE and none
of them allow me to do this. Should I be able to?

AUTO - primary key, but not auto-incrment
IDENTITY - auto-increment but not primary key
SEQUENCE - primary key, but not auto-increment

Thoughts?

Problem #2:
I have an EmbeddableSuperclass for my entity that defines "common" entity
fields. The DDL generator is creating a table for this superclass. It
doesn't seem that it should.