For the ID of an entity, instead of incremented integers, I want to use prefix_1, prefix_2,... Is it possiblw with doctrine? I guess to do so I should use:
$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_CUSTOM); instead of: $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_IDENTITY); right? if yes, how can I tell doctrine how to generate id? reading this: http://www.doctrine-project.org/api/orm/2.4/source-class-Doctrine.ORM.Mapping.ClassMetadataInfo.html#_setCustomGeneratorDefinition I guess I shoud use: $metadata->setCustomGeneratorDefinition(array ('sequenceName' => 'name', 'allocationSize' => 20, 'initialValue' => 'prefix_'.(add some php to increment here), 'quoted' => 1 )); Am I right? please advice -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
