Re: Getting hold of newly created objects
[prev]
[thread]
[next]
[Date index for 2005/07/01]
On 1 Jul 2005, at 12:19, David Baird wrote:
> I'm wondering if I've got the wrong end of the stick here and I'm
> just being stupid. I need to create new objects and then work with
> them.
i have to ask: what's wrong with
my $thing = $class->create({...}); ?
> After creating the object, CDBI throws away all the object's data.
...in order to force a reload after triggers have been triggered,
since the data may have changed. It goes back to the database on the
first column call.
> The primary key is an auto-increment column in MySQL - and the
> newly created object does not include its primary key value.
That's weird, and probably evidence of a deeper illness. It should
definitely (and only) contain its pk when it comes back from _create.
Are there any triggers involved?
will
|
|
Re: Getting hold of newly created objects
William Ross 12:13 on 01 Jul 2005
|