-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
More a question. I want to add a index on a specific JSON query I know its possible via PostgreSQL the query looks like this:
$queryBuilder->leftJoin(
Contact::class,
'contact',
Join::WITH,
'CAST(JSON_GET(JSON_GET(visit.data, \'code\'), \'contactId\') AS INT) = contact.id',
)It is a third party entity and I wanted to use Events::loadClassMetadata to add a index but the following:
$builder = new ClassMetadataBuilder($metadata);
$builder->addIndex(['CAST(JSON_GET(JSON_GET(visit.data, \'code\'), \'contactId\') AS INT)'], 'data_code_contactId_idx');because it is not a column maybe somebody achieved something like this, without that the ORM is throwing the index away on the next migration.
Metadata
Metadata
Assignees
Labels
No labels