I'm writing a helper method to findFirst() that will work with multiple-column and non-integer keys.
To do so, I need to find the primary key columns of whatever model I'm using the function with. Currently I do this:
$class = get_called_class(); $MetaData = new \Phalcon\Mvc\Model\MetaData\Memory(); $primary_keys = $MetaData->getPrimaryKeyAttributes(new $class());
I hate to duplicate work though, so I wonder if Phalcon already has that information somewhere that I can access?