View Single Post
  #1 (permalink)  
Old 02-16-2008, 11:34 AM
mgordon mgordon is offline
Junior Member
 
Join Date: Sep 2007
Location: Stockholm, Sweden
Posts: 27
Send a message via Skype™ to mgordon
Post A quick and dirty ORM for 1.5

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.
Reply With Quote