PHP: ORM framework or library that I can use with my database table structure - Printable Version +- 0Day Forums (https://0day.red) +-- Forum: Coding (https://0day.red/Forum-Coding) +--- Forum: FrameWork (https://0day.red/Forum-FrameWork) +--- Thread: PHP: ORM framework or library that I can use with my database table structure (/Thread-PHP-ORM-framework-or-library-that-I-can-use-with-my-database-table-structure) |
PHP: ORM framework or library that I can use with my database table structure - micco858 - 07-20-2023 I was using KohanaPHP ORM but I can't use it with my database table structure. So, I need a framework or library ORM to use with it. With Kohana I need to follow a naming convention. I can't use a field name (foreign key) like 'idUnidadeMedida'. Are there any suggestions? Thank you. --- <?php class Model_Produto extends ORM { protected $_table_name = 'produtos'; protected $_primary_key = 'pro_codigo'; protected $_has_one = array('unidade' => array('model' => 'unidade', 'foreign_key' => 'uni_codigo')); } ?> <?php class Model_Unidade extends ORM { protected $_table_name = 'unidades'; protected $_primary_key = 'uni_codigo'; } ?> RE: PHP: ORM framework or library that I can use with my database table structure - cimmeriankdmxgum - 07-20-2023 Doctrine is PHP's most powerful ORM (and database abstraction layer) - there's not much it can't do. V2 (soon to be released) may well become the de-facto standard, and will see integration with frameworks (i.e. Zend, although it's easily used stand-alone too). - [Doctrine 2 Preview release][1] - [Slideshare presentation][2] - [Wiki Overview][3] [1]: [To see links please register here] [2]:[To see links please register here] [3]:[To see links please register here] RE: PHP: ORM framework or library that I can use with my database table structure - Protrochantinian255 - 07-20-2023 Actually, Kohana ORM isn't that limited. In case of Ko3's ORM, you can define everything concerning your relationships as I explained here; [To see links please register here] ( look at the code, not explanation, since that guy asked for varchar FKs ) |