Subject | Re: andromda+hibernate |
---|---|
Author | davidedr2002 |
Post date | 2004-05-16T21:13:10Z |
thanks roman, i'm getting to experiment.
Another question: can I use the "embedded" FB work mode
in java (layering is my application/spring/hibernate/Fitebird)?
thanks
davide
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@a...> wrote:
Another question: can I use the "embedded" FB work mode
in java (layering is my application/spring/hibernate/Fitebird)?
thanks
davide
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@a...> wrote:
> > I use andromda to generate persistence descriptors (.hbm files)primary
> > from UML diagrams that are fed to hibernate to implement
> > the persistence ayer in my application.
> > what's strange is that the process generates ddl files
> > containig DD statements looking like this:
> >
> > create table HIB_REMOVED_BARCODE (ID VARCHAR(255) not null, class
> > VARCHAR(255) not null, CODE VARCHAR(255), TYPE INTEGER(9),
> > key (ID))eat
> >
> > AFAIK, TYPE is a reserverd keyword for FB, and as a matter of fact
> > FB throws the error:
> >
> > Unsuccessful: GDS Exception. 335544569. Dynamic SQL Error
> > SQL error code = -104
> > Token unknown - line 1, char 109
> > TYPE
> >
> > if I try to issue the statement (in this case
> > I can change that class' member name: hussle, nut no more).
>
> You can simply quote column name TYPE -> "TYPE" and Firebird will
> it without any problems. However, it might cause problems later.MD5)
>
> > What's worst is the "primary key (ID)" statement:
> > id is 255 chars long
> > and FB does not support so long primary keys!
> >
> > Any hint?
>
> That's Firebird's limitation for index key size. You have to change
> your PK to either surrogate PK or build a hash (for example using
> and use it as PK. As far as I remember Hibernate supports sequences
> with Firebird and introducing surrogate key should not be a problem.
>
> Roman