Search for ORM with Multi-Table-Object Supportby Xel (Novice)
|on May 02, 2012 at 18:34 UTC||Need Help??|
Xel has asked for the
wisdom of the Perl Monks concerning the following question:
I am searching for a good ORM. I found some ORMs but somehow none of them seems to have what I am looking for.
I need something like Multi-Table-Objects.
Well I found some ORMs supporting them, but not in perl. For example there are SQL Alchemy for python and hibernate for java.
I need are objects consisting out of more than just one table. Joined together as needed but transparent for the application.
Yes the example is clumsy and no one will see a need in having them all in one object. But think about historically grown data structures. Changing them is nearly impossible without having an abstraction layer between the application code and the data-structures.
This can not be managed with one-to-one relations, like they are available in nearly every ORM. Being able to handle this with one object rather than a relation is a great thing, enables one to push fields around the database, split tables and do whatever needs to be done to the Database without changing more than just one class.
If they would be in different classes moving a field to another table would require to change two classes and every code-line accessing the attribute in any way.
See I want to have some more abstraction from the Database within the application.
I do not only want to stop loading specific fields, I want to keep tables slim, small and fast.
I want to be able to change database-layout (up to a certain extent) without having to change tons of lines of sql code widely spread among hundreds of modules and scripts.
What I specially need in an ORM:
I see no problems with most of them, but with the first one...
Does anyone know a ORM fitting my needs in perl?Regards Alex