Hi.

The problem is:

A   1:1   B
B.a = OneToOne(A)

and there is a vA - an unmanaged model of A's view


A and B are linked together.
vA view is not linked with B, of course.

When I try to declare OneToOne within vA, Django expects vA.b_id field 
which is missing (that's ok).
When I try to declare sedond OneToOne within B (with db_column set to 
B.a_id and on_delete=DO_NOTHING),  Django complains about 
"models.E007": column name 'a_id that is used by another field.
When I declare second 1:1 and ignore models.E007, I can't save B model 
anymore due to "many assignments to the same column" (these values are same 
and will be always same, but "Django knows better").

So how to map a relation for my view? Is Django really so limited? 

Marcin

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aff3aa41-c67c-4ebe-ad61-c83c3018804a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to