Its not working on 1.1.0, not with that syntax. Same error about method not found.
Well, lets wait and see who can answer it. 2011/5/3 Xavier (DBIYF) <[email protected]> > On 3/05/11 11:25 PM, Israel Ben Guilherme Fonseca wrote: > >> The question is probabbly STUPID, but i didnt found any doc, in any >> place with a simple "hello world transaction with datamapper". >> >> I'm using Datamapper 1.1.0. I tried to start a transaction like this: >> >> ::DataMapper.repository.transaction do >> object.save >> end >> > one way: > > class MyModel > include DataMapper::Resource > end > > MyModel.transaction do > # ... > end > > object = MyModel.new > object.transaction do > # ... > end > > Both execute the same query, it's just a convenience as to how you access > it. > > repository.transaction used to work in 1.0, I'm not sure why/where it was > moved. Hopefully someone else will chime in. > > Xavier > > >> It wont work (repository dont have a transaction method). >> >> -- >> You received this message because you are subscribed to the Google >> Groups "DataMapper" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/datamapper?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "DataMapper" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/datamapper?hl=en. > > -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.
