Getting benifits of database transactions in an OO way?
Sun Aug 22 05:35:55 CEST 2004
Leif K-Brooks <eurleif at ecritters.biz> writes:
> But then multiple row classes would have to create their own
> connections, which would be bad for performance:
> import people
> import companies
> people_transaction = people.begin_transaction()
> companies_transaction = companies.begin_transaction()
You wouldn't do it that way.
> I think I'll just require users of modules which handle data to commit
> on their own. Not ideal, but it seems to be the best possible.
You could take a look at how javabeans does it.
More information about the Python-list