FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Repository pattern implementation that knows nothing (Jon Snow) about the database table and column names
Show: Today's Messages :: Unread Messages :: Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Return to the default flat view Create a new topic Submit Reply
Repository pattern implementation that knows nothing (Jon Snow) about the database table and column names [message #186366] Tue, 08 July 2014 11:47 Go to previous message
qissolol is currently offline  qissolol
Messages: 1
Registered: July 2014
Karma:
Junior Member
add to buddy list
ignore all messages by this user
I've seen around the Internet and Github, implementations for the design pattern Repository that knows about database table and column names. I was think, if I want to work with the database as a plugin, that I can unplug and plug another respecting Open/Closed for the rest of my code, my repository should not know about the column names of the database I'm using. So how to implement this pattern in a way that it can transform the result from the database into a Entity of my domain, without knowing about the database table and column names?

As my main language is PHP, I saw that in Doctrine\ORM you can easily pass different yamls or xmls config files, mapping the column names to property names on the Entity, but... I cant be a hostage of a library implementation, if I want to implement raw PDO, or any other library for my repositories that doesn't make this hydration out-of-the-box, my implementation should do, so how?
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: schemadb oleata test it
Next Topic: Help with Pear Soap Client to weather service
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Jan 12 18:38:25 EST 2025

Total time taken to generate the page: 0.07958 seconds