On Mon, Dec 11, 2006 at 03:37:38PM -0500, David Turner wrote:
> > Shouldn't it be considered a bug in the user program if it access the DB
> > during row creation?
>
> I don't see why it should be.
Because accessing the DB during row creation when the "row" is actually
a set of rows exposes the inconsistent state of the DB, and SQLObject
certainly cannot prevent this.
> The actual use case I had in mind was that a table's elements acted as a
> sortable list, so the table has a column sort_index, which is unique. I
> want to set the sort_index on new elements to be one plus the max of the
> sort_index on the old elements -- that is, new elements should appear at
> the end of the list.
"sort_index" should be an autoincremented int. Thus the DB guarantees
both consistency and speed.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss