Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

ORM Column Name Issue with primary key and fActiveRecord and fRecordSet

posted by joshmcoffman 6 years ago

If you are using fActiveRecord.php on a poorly named schema like WordPress, you can override keys like this:

\fORMSchema::retrieve()->setKeysOverride(array('ID'), 'wp_posts', 'primary');

Love the libraries Will. They are especially useful for inherited spaghetti-code projects where I need to get things done right away but start moving it from a bad place to a good place. :)