Basically all that I'm doing is this
Project proj = new Project() -> OM class
// pre-populate using Intake or by manually calling your set methods
proj.save()

All the peer stuff automatically figures out if the proj I'm handing it
already exists (ie - the primaryKey field is blank) and either inserts or
updates.

Hope this helps.

-warner

----- Original Message -----
From: "Mark Orciuch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 12:58 PM
Subject: RE: IDBROKERTABLE


> I figured that people are using it successfully. After examining some
code,
> there's logic in BasePeer.doInsert method which checks if Criteria DO NOT
> contain the primary key before generating the primary key using the
> IDBROKERTABLE. Well, DBSecurityService.addPermission calls
> PermissionPeer.buildCriteria to generate criteria for
> PermissionPeer.doInsert. PermissionPeer.buildCriteria, in turn, includes
the
> primary key (PERMISSION_ID). At this point, I'm not certain how the code
to
> generate primary key would execute. Hope this makes sense.
>
> I removed the condition in BasePeer.doInsert (the one checking if Criteria
> DOES NOT contain the primary key before generating the primary key), and I
> got a different exception. We are using revision 1.16 of TurbineMapBuilder
> (one that shipped with current release of Jetspeed and I guess I witheld
> that piece of information). I downloaded revision 1.17 and that took care
of
> the problem. I am still unclear about that piece of logic in
> BasePeer.doInsert...
>
> Best regards,
>
> Mark C. Orciuch
> IT Consultant
> Voice: 219-647-4122
> e-Mail: [EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: jmcnally [mailto:jmcnally]On Behalf Of John McNally
> Sent: Thursday, July 19, 2001 10:20 AM
> To: [EMAIL PROTECTED]
> Subject: Re: IDBROKERTABLE
>
>
> i have used it several times and was successful.  My current usage
> entails setting the idMethod="idbroker" on appropriate tables and making
> sure entries exist in the id_table for those tables.  My experience with
> it has been great, in that rows get inserted with id's as expected.
> Disclaimer: I wrote a large part of the code involved.
>
> john mcnally
>
> Mark Orciuch wrote:
> >
> > Is anybody out there successfully using the IDBROKERTABLE method of
> > generating primary keys? I would appreciate any information about your
> > experience. Thanks!
> >
> > Best regards,
> >
> > Mark C. Orciuch
> > IT Consultant
> > Voice: 219-647-4122
> > e-Mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to