tron ics Fri Sep 03 20:34:36 -0400 2010

Subject: Suggestion: Optional Prefix for Model Classes to prevent Errors when using in Open Source Projects

Hello,

I suggested this feature a while ago, yet me in Person could not get deep enough into this fine project to submit a patch myself.

Phpactiverecords is IMHO the best ORM to use with existing Open Source solutions when you want to avoid to learn the ORM of that solution for quick adaptions or plugins.
Also I think integrating this with other PHP frameworks will make those easier to understand and better performing. Imagine using this with Zend Framework, Cake, Qcodo, etc.

It would definitly rock. Enlarge the userbase AND help all of us through higher adaption and a more lively community over here.

Only one little thing leads to BIG problems:
In an existing project there might already be a Class "car" defined and an existing Databasetable "car".

Now there is the problem that you run into that phpactiverecords relies on finding a Class in the Model named excactly like the Databasetable.

If we could define a prefix in the config, phpactiverecords could use a Classname like "pAR_model_car" that will never overlap with existing namespace.

Please let us work together to find a nice patch for this.

Best regards,
tronics