This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'dm-core' | |
DataMapper.setup(:default, 'sqlite3::memory:') | |
class GameConsole | |
include DataMapper::Resource | |
property :id, Serial | |
property :type, Discriminator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script demonstrates major performance problems when enabling the dm-timestamps plugin in | |
# DataMapper 0.10.2. | |
require 'rubygems' | |
require 'dm-core' | |
DataMapper.setup(:default, 'sqlite3::memory:') | |
class City | |
include DataMapper::Resource | |
property :id, Serial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'dm-core' | |
DataMapper.setup(:default, 'sqlite3::memory:') | |
class Zoo | |
include DataMapper::Resource | |
property :id, Serial | |
property :name, String |