[CDBI] Why does CDBI not populate the object on insert

Perrin Harkins pharkins at gmail.com
Thu Mar 5 23:45:38 GMT 2009

On Thu, Mar 5, 2009 at 6:29 PM, Kevin Brown <Kevin.M.Brown at asu.edu> wrote:
>> Ya, but my point of course is if I just defined the artist name
>> I probably don't need to fetch it back from the database.
> That would be true for a single user application, but what about a
> database system with multiple people accessing it at the same time?

That isn't really the problem this was meant to solve.  Any time you
read data from the db and don't grab an exclusive lock (e.g.
SELECT...FOR UPDATE), someone else can change it while you're working
on the data.

This re-fetch is just meant to handle changes made by the database
itself, through triggers or type coercion.

- Perrin

More information about the ClassDBI mailing list