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