On Tuesday 17 April 2007 07:43, Ed Leafe wrote: > On Apr 17, 2007, at 10:31 AM, johnf wrote: > > I can write a function that returns the last generated number using > > Postgres's 'lastval()' if the table uses a sequence. But what > > happens if the > > table does not use a sequence? Or does not have any PK? Or uses some > > compound index. > > John, the only purpose for the function is to get the PK when the > developer has set things up as AutoPopulatePK=True. See the > explanation in dBackend.getLastInsertID() > > -- Ed Leafe > -- http://leafe.com > -- http://dabodev.com
If I understand, I retrieve the last PK if AutoPopulatePK=True? What if no insert has occurred? Can I depend on a bizobj having the PK identified? -- John Fabiani _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]
