Friday, June 24, 2011

Re: Creating an instance of a subclass when superclass instance already exists

Sorry. I'd been thinking in terms of a not null constraint and confusing myself
that it would apply in both directions.

Bill

On Fri, Jun 24, 2011 at 10:25 AM, Tom Evans <tevans.uk@googlemail.com> wrote:
> On Fri, Jun 24, 2011 at 3:15 PM, Bill Freeman <ke1g.nh@gmail.com> wrote:
>> So long as it *IS* one to one.  I.e.; there are no Word-s that are both a
>> Verb and a Noun.
>>
>> I'd sill go with a foreign key field in Verb (and Noun, etc.)
>> referring to Word.  I
>> think that you can even mark it unique, meaning that only one Verb can
>> refer to any given Word, but both a Noun and a Verb could refer to the same
>> Word.  But you know your needs.
>>
>> Bill
>>
>
> There is no issue with Word-s that are both Noun and Verb if both Noun
> and Verb have a OneToOneField to Word - the Noun and Verb instances
> can point to the same Word instance without any issues whatsoever.
>
> Cheers
>
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate