-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
I am using EAV with normal entities.
Use case
user has many roles, roles can belong to many users. Let's assume User is an EAV model, but Role is a normal entity.
Question 1 : how to design the User EAV model.
sidus_eav_model:
families:
Project:
attributeAsLabel: username
attributes:
username:
required: true
type: string
roles:
type: integer
collection: true
<entity name="Acme\Component\User\Model\Role" table="acme_role">
<id name="id" type="integer">
<generator strategy="AUTO"/>
</id>
<field name="role" type="string" unique="true" length="30" nullable="false"/>
<field name="label" type="string" length="30"/>
<field name="description" type="text" nullable="true"/>
</entity>
Question 2: What is the effecient way to get a list of users with associated roles?
Metadata
Metadata
Assignees
Labels
No labels