Don't know if this solves your problem, But

I just added an attribute to the <table> tag, that specifies the method
to be used for generating ids.

<table name="foo" idMethod="bar">

where bar=idbroker,autoincrement,sequence, or none

none will be taken as the default if the idMethod attribute is absent.

If "sequence" is specified, you should give the name of the sequence
like this:

<table name="foo" idMethod="sequence">
   <id-method-parameter value="seqName" />
...
</table>

The torque om/MapBuilder.vm shows how these can be translated to actual
code.
Basically $table.IdMethod gives the method
$table.IdMethodParameters gives a Vector, the first element of which is
the parameter value of interest.  This can be fixed up as we become more
certain whether there are any db's that might need more than one
parameter; if the most number of parameters is one it can be simplified.

So the MapBuilder.vm code is in place.  The sql scripts still need fixed
up.

> 
> The object returned from WhateverPeer.doInsert(whatever) is supposed to
> be an Integer of the unique ID that got added, right?  When I set the
> ROWID field on a table to be an AUTOINCREMENT, items are getting added
> properly, but the object returned is always null.
> 
> When I turn off the autoincrememt, I added an element to the id_table
> with the name of the table, and a NEXT_ID and QUANTITY.  When I try this
> method to do an insert, it_table updates that entry, setting the
> QUANTITY to 0, and the ROWID for the newly entered item is 0.  And the
> object returned from doInsert() is again null;
> 
> What do I have to do in the Map or Peer class to specify how I'm getting
> ID's?  Is there something else I'm missing here?
> 
> Will Stranathan
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to