Ticket #381 (closed enhancement: fixed)
Doctrine integration
| Reported by: | ross.lawley@… | Owned by: | david |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11 |
| Component: | database | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Patch attached: |
Description (last modified by ross) (diff)
Hi all,
Attached is the BaseDoctrineDatabase class for inclusion for Doctrine support. Please add it with any other Doctrine Record / Table / EventListener Models to the base autoload.xml and support for Doctrine is there!
Please Note (I may have a wierd setup!)
I have added a !core.libs_dir to the config and package the Doctrine lib application in a libs directory off my project route.
If you package yours elsewhere (or checkout the whole Doctrine source) then you will need to edit line 93 - to use the correct config path and point to the actual Doctrine/lib directory (the one that contains Doctrine.php and the Doctrine directory).
Example Usage:
// Add your doctrine records to autoload.xml $user = new UserRecord; // Do something with the model $user->name = "Jack Daniels"; $user->Email->address = "jackdaniels@drinkmore.info"; $user->Phonenumber[0]->phonenumber = "123 123"; $user->Phonenumber[1]->phonenumber = "133 133"; $user->Group[0]->name = "beer lovers"; $user->Group[0]->Email->address = "beerlovers@drinkmore.info"; $user->save();
Ross
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

