#1232 ✓resolved

#transaction method not added to DataMapper::Resource

Reported by LeMarsu | April 3rd, 2010 @ 10:52 AM | in 1.0.0

When defining resources before calling DataMapper.setup(...), the method #transaction (at least) is not created on the resource.

  require 'extlib'
  require 'dm-core'
  require 'dm-transactions'
  class Resource1
    include DataMapper::Resource
    property :id, Serial
  DataMapper.setup(:default, 'sqlite3:memory:')
  class Resource2
    include DataMapper::Resource
    property :id, Serial
  p Resource1.new.methods.grep /transaction/ # => []
  p Resource2.new.methods.grep /transaction/ # => ["transaction"]

tested on:

  • gem (dm-core v0.10.2)
  • master dm-core (c03f8da874a6ff8bd3ca435c74743fd2b5f012e6) with master dm-transactions (7e77fc48f3532f402894945d3cd0f0c29a4f6bb7).

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Referenced by