• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: postgresql serial columns and wonder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: postgresql serial columns and wonder


  • Subject: Re: postgresql serial columns and wonder
  • From: Guido Neitzer <email@hidden>
  • Date: Sat, 17 Apr 2010 20:12:55 -0700

On 17. Apr, 2010, at 19:49 , Theodore Petrosky wrote:

> I want to expose the primary key to be part of my entity. (At least this is what I think I want.)

Maybe you want this, but is it what you need? I'd say, you have several options:

In awakeFromInsertion you could query (probably just raw sql) a specific "jobnumber_sequence" in the DB and populate the job number with that value.

If you only use this for display purpose, you could use "primaryKey()" which gives you the primary key of the row. If you call "primaryKeyInTransaction" Wonder will query the database for a pk for a newly created object and you can display this.

Personally, I'd use a separate sequence that is independent of the pk.

cug _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: postgresql serial columns and wonder
      • From: Theodore Petrosky <email@hidden>
References: 
 >postgresql serial columns and wonder (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: postgresql serial columns and wonder
  • Next by Date: Re: postgresql serial columns and wonder
  • Previous by thread: postgresql serial columns and wonder
  • Next by thread: Re: postgresql serial columns and wonder
  • Index(es):
    • Date
    • Thread