
dm-aggregates doesn't work when loaded after the model
Reported by Martin DeMello | June 28th, 2010 @ 06:47 PM
require 'dm-core'
require 'dm-migrations'
DataMapper::Logger.new($stdout, :debug)
DataMapper.setup(:default, 'sqlite::memory:')
class Group
include DataMapper::Resource
property :number, Serial property :groupname, String, :length => 40 end
DataMapper.auto_migrate!
require 'dm-aggregates'
Group.count
ruby-1.9.2-preview3 mungo:dm-snippets snusnu$ bundle exec ruby
zem.rb
~ (0.000102) SELECT sqlite_version(*) ~ (0.000146) DROP TABLE IF
EXISTS "groups" ~ (0.000014) PRAGMA table_info("groups") ~
(0.000319) CREATE TABLE "groups" ("number" INTEGER NOT NULL PRIMARY
KEY AUTOINCREMENT, "groupname" VARCHAR(40)) ~ (0.000069) SELECT
"number", "groupname" FROM "groups" ORDER BY "number"
Comments and changes to this ticket
-
Martin Gamsjaeger (snusnu) June 28th, 2010 @ 06:49 PM
- State changed from new to confirmed
- Assigned user set to Martin Gamsjaeger (snusnu)
-
-
Piotr Solnica (solnic) May 17th, 2011 @ 02:27 AM
- Tag set to dm-aggregates
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »