The OM/Peer model is able to to use autoincrement, sequence, idbroker,
and none as others have said.  I have not added support for the
situation you describe however.  The complex OM/Peer model assumes you
will have some way of retrieving the id during the insert.  So for
sequences it needs to query the sequence itself, before inserting the
object/row.

That said you may still find the simple om model useful while setting
the idmethod to "none".  Note that the om model is set from torque.props
before generating the classes.  I think the current default may be
simple but at a later time it is likely to become "complex".  I would
like to give a warning regarding the addSaveMethod=true option in
torque.props.  It may or may not cause problems.

We welcome any improvements you may offer that would work generally with
the technique of triggering the sequence internally.  I hope you still
find torque/om/peer classes useful with these adjustments, so your time
is not wasted.

John McNally


David Ramsey wrote:
> 
> The VARCHAR2 is being mapped to String, yes. And I did pull the
> parameters by hand, loaded a criteria, and called doUpdate(crit) with
> the same result.
> 
> Also, double checking the inserts, they just blow up with an exception.
> I am not at all interested in using the ID Broker for these tables and I
> was under the impression, given the light documentation on Torque, that
> setting autoincrement="false" would disable this but apparently it has
> not. However, it is still attempting to access sequences that don't
> exist, resulting in exceptions.
> 
> Is there a way that I can disable the ID broker entirely? Every single
> one of these tables at this company are covered with a before insert
> trigger that uses their own sequencer to set the ID field the way they
> want it. I don't need nor want the overhead of the ID broker but there
> is nothing terribly clear about how to disable this "feature" at all.
> 
> Torque is nice if you are starting from scratch and can control the
> structure of the database. Often though I work with medium and large
> scale companies that have existing databases and they are not going to
> reorganize them, change sequencers, etc., just for one new app. So far
> I've burned 3 days on a 10 day cycle screwing around with Torque and
> Torque issues. I'll end up eating the time this weekend to make it all
> work but I think I am going to shy away from Torque in the future until
> perhaps it improves. That means alot more raw JDBC code to write but at
> least I know that will work.
> 
> "Brekke, Jeff" wrote:
> >
> > I've noticed that turbine is silent when an update fails via save().  But
> > everytime I've found that
> > it is because I'm not setting a member properly.  Your sql looks
> > interesting, what is VARCHAR2 is this being mapped to a string?
> >
> > Also, try to read the members out of data.getParameters() by hand, throw
> > them into a Criteria, and call SlaTypePeer.doUpdate(crit)
> > and see if that works.
> >
> > For me 1.1a11 is working with sybase and mysql.
> >
> 
> --
> David Ramsey -- [EMAIL PROTECTED]
> 
> -- There is an old Vulcan proverb: only Nixon could go to China.
> 
> ------------------------------------------------------------
> 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