Thomas Dudziak wrote:
On Fri, 26 Mar 2004, Laurie Harper wrote:
Hi, just thought I should report this (I'd log it as a bug, but Scarab doesn't work for me :-( ):

When settings the 'autoincrement' attribute of @ojb.field to 'native', the xdoclet module doesn't generate 'autoincrement' attributes in the OJB repository descriptor. These are necessary to tell OJB that these are managed fields; without them, nothing works unless you manually assign values to the autoincremented fields, defeating the point really!

You may be right here (I'm not an expert when it comes to the SequenceManagerNativeImpl). I'll have a look.

The problem is OJB needs to know which properties to consult the sequence manager for. Otherwise, the sequence manager doesn't get used.


Setting 'autoincrement' to 'database' generates the 'autoincrement' attributes in the OJB repository descriptor fine. As far as I can tell, this is always the correct thing to do for an autoincrementing property; you then tell OJB how to manage autoincrement properties through the database connection descriptor. (Haven't figured out if there's a way to have some properties use native sequencing and some use OJB managed sequencing yet).

I don't think this is possible as the connection descriptor can have at most one sequence manager which is then used for generating the sequences.

Yeah, that's what it looked like to me -- though I guess you could write a seq manager that delegates to different seq managers according to the class/property it's being queried for.


L.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to