datamapper Questions
3
Solved
I have an external database that is feeding information to me. One saves their data as native GUID format and my other data source supplies standard .NET GUID format string.
Is there a tidy way to...
Sulphathiazole asked 9/11, 2011 at 11:56
4
Like doctrine(active record) and Xyster(data mapper),what's the difference?
Armagnac asked 10/3, 2010 at 3:18
1
Solved
From the DataMapper document, I think there are at least four functions need to be called to have database setup:
DataMapper.setup(:default, 'sqlite:///path/to/project.db')
DataMapper.finalize
Dat...
Sagamore asked 2/5, 2013 at 8:19
3
Solved
I've got a problem with Spork test server.
If I set config.cache_classes = false in config/environments/test.rb then specs start to rasie errors.
Failure/Error: task = Factory(:something, :foo =...
Functional asked 6/5, 2011 at 15:1
2
Solved
We are using Datamapper in a Sinatra application and would like to use case insensitive like that works on both Sqlite (locally in development) and Postgresql (on Heroku in production).
We have st...
Bujumbura asked 5/10, 2011 at 9:14
2
Solved
I have found several examples using datamapper and was able to get them to work. All these examples are for a sqlite database though. I'm trying to use datamapper with postgresql.
I changed the ca...
Splay asked 29/3, 2012 at 11:31
3
I am writing a system in PHP that has to write to three persistence layers:
One web service
Two databases (one mysql one mssql)
The reason for this is legacy systems and cannot be changed.
I a...
Exclamation asked 25/10, 2012 at 8:7
3
Let's say we have "User" and a "Hotel" model classes. I'd use a User_Mapper and Hotel_Mapper to load/save/delete etc. I want to then have the user be able to mark their "favourite" hotels. In the d...
Unarm asked 7/7, 2010 at 7:33
1
Solved
I found two patterns which appear to have the same goal - what is the difference?
http://martinfowler.com/eaaCatalog/dataMapper.html
http://martinfowler.com/eaaCatalog/repository.html
Algae asked 25/11, 2012 at 11:43
3
Solved
I am trying to install dm-types for DataMapper on my machine with
gem install dm-types
I've installed Ruby from RubyInstaller (1.9.3) and I also have the DevKit installed. (Aswell as some othe...
Beneficence asked 17/1, 2012 at 0:8
3
Solved
I'm working on a Rails 3.2 app that uses Datamapper as its ORM. I'm looking for a way to sort a result set by an attribute of the associated model. Specifically I have the following models:
class ...
Pseudocarp asked 14/9, 2012 at 17:42
2
Solved
this question did a very good job of clearing my confusion a bit on the matter, but I'm having a hard time finding reliable sources on what the exact limitations of the service layer should be.
Fo...
Showery asked 13/8, 2012 at 21:49
3
Solved
I am writing an application which requires the Master/Slave switch to happen inside the application layer. As it is right now, I instantiate a Zend_Db_Table object on creation of the mapper, and th...
Recap asked 1/12, 2009 at 15:8
3
Solved
In Datamapper, how would one specify the the combination of two fields must be unique. For example categories must have unique names within a domain:
class Category
include DataMapper.resource
p...
Councilwoman asked 2/9, 2009 at 22:37
2
Solved
For some reason, heroku tries to require dm-sqlite-adapter, even though it should use Postgres here. Note, that this happens when I open any URL - not during the git push itself.
I built a default...
Twickenham asked 18/1, 2012 at 15:26
1
Solved
I am looking to add an ORM to my existing Sinatra app. I went through Datamapper, Sequel and ActiveRecord though I haven't tried ActiveRecord yet.
Datamapper seems easy but I am constantly facing ...
Dish asked 20/3, 2012 at 14:32
1
I'm using DataMapper, an open source ORM for ruby, and I have in itch I would like to scratch. At the moment, DataMapper can use Strategic Eager Loading(SEL) for one-to-many relationships, but not ...
Gers asked 26/8, 2009 at 19:14
1
Solved
As a learning exercise, I am building a practice app using Sinatra, Datamapper and RSpec. I am using this template, which is basically a boilerplate for all the above.
The problem I am having is t...
Tan asked 21/2, 2012 at 10:59
2
Solved
I have entities which I would like to eagerly load , and on other ocassions lazy (or even extra lazy) load.
My mappings have no fetch mode declared in my YAML- so they use the default (lazy loadin...
Willpower asked 4/8, 2011 at 9:53
5
Solved
I'm looking for a Ruby ORM to replace ActiveRecord. I've been looking at Sequel and DataMapper. They look pretty good however none of them seems to do the basic: not loading everything in memory wh...
Horotelic asked 13/1, 2012 at 10:47
1
Goal: Deploy a simple test app with Sinatra + DataMapper + Postgres + Heroku
Issue: When using gem 'dm-postgres-adapter' gem 'dm-sqlite-adapter' to push the app to Heroku I get this.
Installing do_...
Falla asked 14/1, 2012 at 23:54
1
Solved
After a lots of read about Repository and Data Mapper I decided to implement those patterns in a test project. Since I'm new to these I'd like to get your views about how did I implement those in a...
Channing asked 12/1, 2012 at 23:55
1
Solved
I have an existing Rails 3 application using ActiveRecord, and I want to switch to Datamapper. The instructions given in the dm-rails page only talk about creating a new application. Does anyone kn...
Annuity asked 15/12, 2011 at 22:21
3
Solved
I'm starting my first Sinatra App and I'm trying to use DataMapper. Everything is in the very early stages, as I can't get it to actually create the DB. I get "LoadError: no such file to load -- dm...
Brindle asked 4/7, 2011 at 4:46
3
Solved
Ok, so this is driving me crazy. I have read the Associations article and example and been trying to work this out for the las three days and I'm tired of this making me feel dumb, so...
How does...
Flexure asked 22/9, 2011 at 21:54
© 2022 - 2024 — McMap. All rights reserved.