From: Daniel E B. <da...@li...> - 2004-10-05 21:23:46
|
Hello all I have been playing with SQLObject again because I just redesigned a rather large database. I was wondering if there was a way to tell whether something was fetched or inserted into the database with the _init method. Also are there hook methods for doing anything special with SELECT, INSERT, UPDATE and DELET? I have some special fields that are tacked onto every table that I use: createdOn, createdBy, modifiedOn, modifiedBy, partner_id, and tag. I would like to be able to add things to each type of query that utilizes these fields. Also, I cannot seem to be able to pass in a transaction when instantiating an SQLObject class. Some help there would be nice too. I was trying something like: conn = Foo._connection trans = conn.transaction() Foo(bar=0, biz=1, baz=sqlbuilder.func.NOW(), connection=trans) trans.rollback() when overriding _init and printing out some stuff the connection param is None. Thanks for the Help, Dan |