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

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

Description

@solnic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions