Re: more on inherited classes
[prev]
[thread]
[next]
[Date index for 2004/07/28]
On Tue, Jul 27, 2004 at 06:33:16PM -0400, Dana Hudes wrote:
> I get the same behavior: create and retrieve return a hash with only
> subject_id, the primary key.
> I looked into this and found that in Class::DBI::_create
> everything was getting tossed out and I don't understand why.
> Temp columns yes I could see maybe. But the contents of $real?
> Leaving me with only my primary key fields? Why?
This is deliberate.
After you insert something to the database, Class::DBI has no way of
knowing what the database actually holds. There are lots of reasons why
the database would change what you give it: default values may kick in,
values may be truncated to fit column lengths, triggers may completely
change everything, etc. So we just discard everything and re-fetch it
when next requested to make sure we have the correct values.
The create() trigger allows you to change this behaviour.
Tony
|
|
Re: more on inherited classes
Tony Bowden 06:38 on 28 Jul 2004
|