Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

dm-aggregates doesn't work when loaded after the model #5

Open
solnic opened this issue May 17, 2011 · 1 comment
Open

dm-aggregates doesn't work when loaded after the model #5

solnic opened this issue May 17, 2011 · 1 comment

Comments

@solnic
Copy link
Contributor

solnic commented May 17, 2011

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

END

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"


Created by Martin DeMello - 2010-06-28 23:47:25 UTC

Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/1344

@solnic
Copy link
Contributor Author

solnic commented May 17, 2011

Pastie link: http://pastie.org/1022588

by Martin Gamsjaeger (snusnu)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant