Questions tagged [datamapper]

Architectural pattern for separating application logic from storage.

Objects and relational databases have different mechanisms for structuring data.

The Data Mapper is a layer of software that separates the in-memory objects from the database. Its responsibility is to transfer data between the two and also to isolate them from each other. With Data Mapper the in-memory objects needn't know even that there's a database present; they need no SQL interface code, and certainly no knowledge of the database schema.

Pattern definition: http://martinfowler.com/eaaCatalog/dataMapper.html

1134 questions
-1
votes
1 answer

Extract Excel data to transform to a simple XML

I am working on creating orders/receipts for a certain client that provides the data using Excel. However, it is not a common Excel table format but an actual form to be printed. I am having issues with the data mapper since it cannot be parsed…
Paul D.
  • 181
  • 2
  • 16
-1
votes
1 answer

Adding a table to datamapper gives me 'uninitialized constant' error

I'm trying to add a table to my app but when I do I get the error shown below. But I don't understand why? All I did was adding the Recommendation class. class Item include DataMapper::Resource property :id, Serial property :sortorder,…
Joel
  • 3,166
  • 5
  • 24
  • 29
-1
votes
1 answer

How can I resolve the IllegalContextError when attempting to save a datamapper model?

When I try to this code, I get an IllegalContextError at the "self.save..." line. Can you tell me what I'm doing wrong? I would just call the create method on Player without messing around with initialize, but I want a related week object to be…
JoeyC
  • 764
  • 11
  • 19
-1
votes
2 answers

Can I populate an object from a db but still have access to its methods?

This is my second post today because I'm very new at OOP in PHP, so bear with me if it's a silly question... I've created a beautiful class that I want to be able to use with my "JOB" objects that includes being able to use this single object to…
DevlshOne
  • 8,357
  • 1
  • 29
  • 37
-2
votes
1 answer

Join in datamapper in codeigniter

How to Create INNER JOIN query in datamapper in codeigniter? Country : id(int) | Name(varchar) User : id(int) | name(varchar) | country_id(int) Required Query SELECT * FROM User u INNER JOIN Country c ON(c.id = u.country_id) WHERE u.name LIKE %abcd%
Tomas
  • 514
  • 4
  • 13
  • 37
-2
votes
1 answer

mule datamapper - first line of the csv file has been skipped

Data mapper has skipped the first line of the csv file during processing. How do i include the first line of the file in payload? Appreciate your reply at your earliest convenience. Thanks.
Kulan
  • 21
  • 4
-2
votes
1 answer

Datamapper php relations

Well, I have 3 tables: sorty with fields id, name, fStart, fEnd bol with fields id, fol, and bol_sorty with id, bol_id, sorty_id When I add a new register to sorty, it must add to bol the number of items from fstart to fEnd. I know how to create a…
-3
votes
3 answers

DAO tutorial in pure JDBC / Java

I'm looking for a tutorial / best practice example on how to implement DAO layer in pure Java/JDBC. Are most DAOs based on Data Mapper pattern ? Is Active Record pattern also used ? How do You do it ?
Sebastian Dusza
  • 2,470
  • 2
  • 30
  • 54
-4
votes
4 answers

Sinatra, select from Datamapper pass to Haml

I'm doing a brief exercise, condensed below. The issue I'm having is that I'm able to pass a selection of all tickets, but not a selection of one ticket. At / there is no problem listing all the tickets, at endpoint for a ticket I get: NoMethodError…
anastazja
  • 1
  • 1
1 2 3
75
76