Thanks.

About simple sequential identifier:

I have these tables:

   - role(id, parent_id, name);
   - action(id, controller_id, name);
   
I understand you are proposing this table:

   - role_has_action(sequential(id), unique_key(role, action, controller));

I suppose it will work, and I don't even see the need for a sequential ID, 
since the 3-tuple key will make entries unique, but then I see that this 
table is no longer tied to role, and action tables.  Hence, I am losing 
referential integrity.  

Dennis



On Sunday, January 12, 2014 10:54:08 AM UTC-5, Marco Pivetta wrote:
>
> You would probably need to use `@JoinColumns()` (notice the "s" at the 
> end) to fix that. I think that's quite complex though - why not just use an 
> unique index on those 3 columns and then have a 
> simple sequential identifier?
>
> Marco Pivetta 
>
> http://twitter.com/Ocramius      
>
> http://ocramius.github.com/
>  
>
> On 10 January 2014 23:02, Dennis Fedco <[email protected]<javascript:>
> > wrote:
>
>> I am trying to join a Role entity with Action entity via a ManyToMany 
>> relationship.
>> The relationship itself is an entity, which I called ControllerGuardRule.
>>
>> vendor/bin/doctrine-module orm:validate-schema reports mapping errors 
>> with ControllerGuardRule entity class and I don't know how to fix it.
>>
>> Please see: Source Files and 
>> Diagrams<https://gist.github.com/dennis-fedco/51d994f05a1255396f64>for 
>> actual source code, and error message given by validate-schema.  
>>
>> Mapping seems to be fine, until I add ControllerGuardRule class 
>> mappings.  Then it kind of breaks down and gives me errors.  
>> How would I go about resolving them?
>>
>> Thanks!
>> Dennis
>>
>>
>>  -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/doctrine-user.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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/groups/opt_out.

Reply via email to