Yeah that's what I was afraid of. I'm just going to make specific values 
tables/entities for each "value type" i suppose.

On Friday, May 9, 2014 11:57:16 AM UTC-4, Marco Pivetta wrote:
>
> Hi James,
>
> This problem can either be solved by having an inheritance between User 
> and Car (which doesn't really make sense) or by having a two different 
> nullable columns on the "Values" table (one being a reference to Car, one 
> to User).
>
>
> Marco Pivetta 
>
> http://twitter.com/Ocramius      
>
> http://ocramius.github.com/
>  
>
> On 9 May 2014 17:14, James Murray <[email protected] <javascript:>> wrote:
>
>> Hello, 
>>
>> I've got a table named "Values" that has the columns "id", "value", 
>> "owner_id", "owner_type"
>>
>> I have multiple entities that can be an "owner", lets say "User" and "Car"
>>
>> my issue is that, If I have User.id = 1, and Car.id=1 how can retrieve 
>> the correct records from the Values table for each of these entities?
>>
>> Do I need to extend some kind of "Owner" class with my User and Car 
>> classes? 
>>  
>> -- 
>> 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/d/optout.
>>
>
>

-- 
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.

Reply via email to