This repository was archived by the owner on Sep 16, 2021. It is now read-only.
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Doctrine ORM "sharded" repository. #24
Open
Description
We could support the Doctrine ORM by using "sharding" based on table fields to provide a hierarchy.
By providing a list of SQL field specifications we should be able to emulate a
hierarchy.
cmf_repository:
repositories:
invoices_by_date:
# e.g. /2016/06/SYMCMF-01
type: doctrine_orm_sharded
class: AppBundle\Entity\Invoice
name: {{ clientRef }}-{{ invoiceNo }} # property access
# in SQL
shards:
- "DATE(date)"
- "MONTH(date)"
invoices_by_client:
# e.g. /SYMCMF/00001
type: doctrine_orm_sharded
class: AppBundle\Entity\Invoice
name: {{ invoiceNo }}
# in SQL
shards:
- "clientRef"
default:
# mount in a composite e.g.
#
# articles/
# ...
# invoices/
# date/
# 2016/
# 06/
# SYMCMF-0001
# client/
# SYMCMF/
# 0001
#
ty: composite
mount:
-
repository: invoices_by_date
mountpoint: "/invoices/bydate"
-
repository: invoices_by_client
mountpoint: "/invoices/byclient"
-
repository: articles # f.e.
mountpoint: "/articles"
Metadata
Metadata
Assignees
Labels
No labels