[CDBI] Re: construct sucks.

Matt S Trout dbix-class at trout.me.uk
Mon Aug 28 19:56:23 BST 2006


Perrin Harkins wrote:
> On Mon, 2006-08-28 at 11:22 -0700, Ryan Tate wrote:
>> Would it be appropriate to "die" in such a case (where the code is
>> being asked to "construct" an object in a manner that overwrites
>> changed columns that have not been saved to the database)? I would
>> think so, since it seems like accidental sort of behavior, not
>> something anyone would have good reason to do.
> 
> I would think you'd want to just ignore the obsolete data from the db,
> not die.

But how can you know it's obsolete? You might want to go "oh shit, data's 
changed under us, HELP" rather than just carrying on and potentially 
flattening new data with an older update.

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the ClassDBI mailing list