![]() |
|
|||
|
In 1.0 I've overloaded the _fetch method to join tables to create an ORM-like app. I only really need this in one place so I don't wan't to change my app to Doctrine.
What I have is in theory simpe: Customer database - contains customer id -- Company database - contains company specific data -- Person database - contains person specific data Since the customer id is the same this seems like a good way of doing it. All I do is a join() where the company or person data are stored in a different var which is then also searched when the __get, save etc methods are called. Worked nicely until the _fetch got fundamentally changed... I've looked at different ORM proposals but all efforts seem to have died off... Pleaze share with me your dirty hack on how to solve this until the devs come up with an orm. Thanks! Last edited by mgordon; 03-13-2008 at 02:01 PM. |
|
|||
|
Ok, I've put together the attached class, not as quick as I hoped but pretty dirty. Got a little bigger than the max allowed txt...
This is my novice aproach to an ORM - Object-Relational mapping database object. Please give hints on howto make the class safer for future changes. Any hints are appreciated. Last edited by mgordon; 02-24-2008 at 12:32 PM. |
|
|||
|
Here is a tutorial/write up I did on a very simple ORM I wrote for 1.5
Zend_Db_Table with Normalized Tables Joshteam’s Weblog |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| Designed by: Miner Skinz |
Powered by vBulletin® Version 3.8.4 Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Search Engine Friendly URLs by vBSEO 3.1.0 |
![]() |