-
Notifications
You must be signed in to change notification settings - Fork 26
Not possible to use a custom naming strategy (No column X on table Client_OAuth2) #24
Comments
This all works perfectly in your example repository so must be something within my own and I shall debug further. Apologies for not checking before! |
Ok, I've traced that this is caused by me using the UnderscoreNamingStrategy within my Db module. |
Can you provide an example application and/or enough source direction to duplicate the error? Supporting different naming strategies probably falls within the scope of this module. |
Basically, within my Module.php, I'm doing: public function onBootstrap($e)
{
$em = $e->getTarget()->getServiceManager()->get('doctrine.entitymanager.orm_default');
$em->getConfiguration()->setNamingStrategy(new \Doctrine\ORM\Mapping\UnderscoreNamingStrategy(CASE_LOWER));
} |
I can duplicate the problem. I didn't find an easy solution. I look forward to your solution. |
Had a look into how it all works and traced it down to the It seems like Doctrine doesn't currently support the ability to specify a property rather than column name. The quick fix I can see is copying the definitions provided and changing to an underscore. Not sure about long-term... Possible to dynamically provide a unique constraint? |
I fixed this with a dynamic index modification to the metadata directly. I even named the index based on the column name. |
I'm attempting to validate/drop/create my schema. With this module and a config like within: "apigility-oauth2-doctrine-skeleton" I'm getting the following error:
Can't quite work out what's causing it as the XML definitions look fine.
The text was updated successfully, but these errors were encountered: