----- Original Message -----
From: "Christophe Lombart" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 04, 2000 12:53 PM
Subject: Peer classes and Informix
> Hi All,
>
> I have 2 questions concerning Turbine :
>
> 1. Peer : I'm discovering Peer classes and I'm wondering how to manage the
> db transaction. I didn't see a code that contains a
> '<BasePeer>.commitTransaction(...)'. When this method is - or not -
> necessary ?
>
> I expect the code defined for "single peer" transaction should like :
>
> <define criteria if needed >
> <PeerClass.do...(...) >
>
> without reference to the transaction management methods ?
>
> What about a transaction that implies 2 different peer class ?
You can only use doXXX in peer and never worry about the rest if you do not
need transactions.
If you need transactions you can start on with BasePeer.beginTransaction().
This starts a transaction and it returns a DBConnection object. For each
doXXX in BasePeer there is an overloaded method that takes a DBConnection
object. This ensures that all database actions falls into the same
transaction.
Hmm.... I don't think Transaction-enabled methods are generated in torque.
Will look into that...
> 2. If I want to use Informix from Turbine, what I have to do ?
> Just create a new database adapter and modify the Turbine prop. file ?
Yep. Take a look at the docs there is a document on database adapters.
~ Leon
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]