datamapper
DataMapper and find_by_sql problem
Player.find_by_sql([\"SELECT u.id, u.name, UNIX_TIMESTAMP(u.last_active) AS last_active, TIME_TO_SEC(TIMEDIFF(NOW(), u.last_active)) AS time_difference, r.status, SUM(d.amount) AS gold_spent, SUM(d2.a[详细]
2023-03-26 20:46 分类:问答DataMapper problems on Heroku
I am trying to deploy a simple app to Heroku (Sinatra and using DataMapper for the ORM), and I am gettin开发者_StackOverflowg these errors whenever I try to submit my form:[详细]
2023-03-24 21:36 分类:问答No Such Table error from SQLite memory DB via DataMapper
I have a Ruby program that uses DataMapper as an ORM to talk to an in-memory SQLite DB. This has been working fine, however I just recently added a new DM class, and corresponding table. To my surpris[详细]
2023-03-24 04:33 分类:问答PHP Data Mapper setters/getters
I\'ve been suggested to use Mappers to separate object storage in db from real object behaviour, which sounds like a nice idea. But being used to other OOP languages like Java or SmallTalk, I always t[详细]
2023-03-22 22:05 分类:问答How to resolve 'column identifier is not unique'?
I\'m building a url shortener from an outdated guide, which has meant a lot of debugging. The first time I ran the shortener, it worked.[详细]
2023-03-21 10:00 分类:问答Don't work behaviors in Datamapper
I work with Sinatra. This is my models. class Post include DataMapper::Resource property :id, Serial property :title, String[详细]
2023-03-20 20:09 分类:问答Data Mapper Pattern - How to select objects by non-ID fields?
I\'ve been working on a CMS project (using Zend Framework) to brush up my skills and have hit a bit of a wall. I decided early on to adopt the data mapper pattern (http://martinfowler.com/eaaCatalog/d[详细]
2023-03-19 12:13 分类:问答Data Mapper Pattern: Complexe query from Service Layer
I\'m sing the Data Mapper Pattern in Zend Framework. This works well so far, bu开发者_JAVA百科t now I got to a point where I need your help/opinion. So let\'s start with the Code:[详细]
2023-03-19 07:57 分类:问答Associating one class to belong to two different classes in DataMapper using Sinatra
I am working with DataMapper and Sinatra to create a simple app. Here\'s the structure: The app has Accounts. Each account has users and campaigns. Each user has comments that should be related to a[详细]
2023-03-18 04:59 分类:问答Form Data is not getting posted to DataMapper DB
I have a simple Sinatra app I\'m playing with, trying to learn the ropes. I have simple form, but the data is not posting. I am using DataMapper to connect to the database, but the data is not getting[详细]
2023-03-17 19:21 分类:问答