Thanks a lot.
I have a property in Product entity as'type'. Each product may have one of
three types or no type at all.
for each type of three types, I have 3 different tables, and relationship
of product to any of these three is OneToOne, or may be it would have no
type at all.
so as the value of 'type' property of Product it may be 'type1', 'type2',
'type3', 'no_type'
then in my Product entity I have three OneToOne to each of typ1, type2,
type3.
Now I have problem when I am going to update a product row using persist, I
am getting error:
NOTICE:
Undefined index: in /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on
line 2693
Fatal error: Call to a member function setValue() on a non-object in
/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2693
If I remove 3 OneToOne mappings the error disapears, so what should I do?
or what if it has no_type and doesn't need to be matched to any of these
three entities? what do you advice? I was thinking of creating another
table/entity
like:
| type   | product_id |
---------------------
  type1  |
  type2  |
  type3  |
  no_type|
then product would be OneToOne to this table, and with product_id in this
table can be matched to appropriate table e.g. type1, type2, via this
table. This way, if it has no type at all, the property will not be null,
and error may be solved? is it the right way? or the error I am getting
above, has nothing to do with this? (for testing I noticed if I remove
these three OnetoOne from Product, error removes.) Please advice. I
appreciate it.

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