Erich Meier wrote:
>
> Vidakovic Aleksandar wrote:
> >
> > I think your problem is that you didn't specify the autoincrement method
> > (Turbine's ID-Broker, autoincrement, sequence). Possible values are:
> > - autoincrement
> > - sequence
> > - idbroker
> > - none
> >
> > Default is none. That's why you get null... Your schema should be
> > something like:
> >
> > <table name="logentry" idMethod="autoincrement">
> > <column name="logentry_id" javaName="Id" required="true"
> > primaryKey="true" type="INTEGER"/>
> >
> > .... (and so on...)
> >
> > Aleks
> >
> > P.S.: The OM class will return a NumberKey object! If you want the
> > integer value then do something like
> > entry.getId().getBigDecimal().intValue()
>
> Thanks a _lot_, that solved the problem!
>
> What I noted, though, is the following comment in the torque DTD:
>
> Do not use autoincrement or sequence. They are deprecated in favor of
> using native which will use the Turbine Connection pool to determine
> which database it is talking to (yes, it knows that) and then use
> whatever native database methodology for insert increments that it can.
> Otherwise, you should use idbroker or none. none is good if you have a
> table that is just a join table. idbroker is good if you want a
> centralized repository for brokering out clumps of id's in a database
> agnostic way.
>
> My problem now is, that the latest torque release 2.1 does not understand
> "native".
>
> I guess, the comment is valid for the CVS version, right?
>
correct
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]