Re: postgresql serial columns and wonder
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