|Couple of problems with generated ddl [message #588778]
||Wed, 24 May 2006 14:11
| Kevin Sutter
Registered: July 2009
Now that I have the Kodo tutorial examples properly loading into Eclipse
(thanks to the workaround for bug 143301), I attempted to generate the ddl
for these examples. I ran into the following problems and am wondering
whether these are known conditions or not.
o The SPECIES field didn't get generated. My code looks like this. The
Persistence Properties panel looks good, so the Discriminator column is
being recognized. But, the ddl didn't create the SPECIES field.
//@Entity(name="Animal") // Bug 143301
public abstract class Animal
o The GENDER and EXPIRED fields were generated as BIT fields, instead of
CHAR fields as required by Derby. I have my Derby database attached to
this Project, but somehow the DDL generator didn't know which database it
was processing against and created invalid field types. From the Rabbit
class, here's the annotated source:
private boolean isFemale = false;
private boolean isDead = false;
o The EATER_ID field was not generated at all. This is also part of the
Rabbit class. It's part of the @ManyToOne relationship. I can't remember
if that is fully supported yet or not...
private Snake eater;
o I also told the DDL generator to generate fully-qualified names
(checkbox on the ddl generator wizard), but I got syntax that dropped the
schema name. Derby didn't like this (not sure if other databases are more
CREATE TABLE .JPA_TUT_ANIMAL ( ...
CREATE TABLE .RABBIT_CHILDREN ( ...
ALTER TABLE .JPA_TUT_ANIMAL ADD CONSTRAINT JPA_TUT_ANIMAL_pk PRIMARY
Powered by FUDForum
. Page generated in 0.01553 seconds