Re: ForeignKeys and friends interface

2007-04-07 Thread [EMAIL PROTECTED]
On Apr 7, 4:59 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > As an aside: something I have learnt a couple of times: "is a" was a > blunder on the part of the OO modelling people once you try to use the > terms internationally. It sometimes becomes hard to explain in languages > that don't

Re: ForeignKeys and friends interface

2007-04-07 Thread Michael Radziej
Hi, [EMAIL PROTECTED] schrieb: > I have defined the following aliases in my models. It looks good > except that ForeignKey has no support for specifying whether you want > to cascade DELETEs to the foreign class. I'd like to point out that > IsMy would provide a very simplistic implementation of

Re: ForeignKeys and friends interface

2007-04-06 Thread Malcolm Tredinnick
On Fri, 2007-04-06 at 16:21 +, Rob Hudson wrote: > On Apr 6, 3:51 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > [An unproven gut feeling: keeping a small reminder, however subliminal, > > that things are relational-database backed is actually a good idea. It > > will stop widely r

Re: ForeignKeys and friends interface

2007-04-06 Thread [EMAIL PROTECTED]
I have defined the following aliases in my models. It looks good except that ForeignKey has no support for specifying whether you want to cascade DELETEs to the foreign class. I'd like to point out that IsMy would provide a very simplistic implementation of class inheritance (with a named baseclas

Re: ForeignKeys and friends interface

2007-04-06 Thread Rob Hudson
On Apr 6, 3:51 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > [An unproven gut feeling: keeping a small reminder, however subliminal, > that things are relational-database backed is actually a good idea. It > will stop widely read people from thinking there is a true object > backing store.

Re: ForeignKeys and friends interface

2007-04-06 Thread Nebojša Đorđević
Jeff Forcier wrote: > On Apr 6, 9:14 am, Nebojša Đorđević <[EMAIL PROTECTED]> wrote: > >> I already have some code for the `DELETE RESTRICT` case. It checking all >> of the FK relations and forbids deletion (throws exception) if they >> exist. If there are interest I can make patch, I just have t

Validation -- again (was Re: ForeignKeys and friends interface)

2007-04-06 Thread Nebojša Đorđević
Nebojša Đorđević wrote: > OTOH, maybe validator is the better place for this? (trying not to hijack the thread :) ) (also see http://code.djangoproject.com/ticket/1553) Now when .96 is out I'm very interested on the status of the model level validation. This issue was delayed for a long time,

Re: ForeignKeys and friends interface

2007-04-06 Thread Jeff Forcier
On Apr 6, 9:14 am, Nebojša Đorđević <[EMAIL PROTECTED]> wrote: > I already have some code for the `DELETE RESTRICT` case. It checking all > of the FK relations and forbids deletion (throws exception) if they > exist. If there are interest I can make patch, I just have to find out > how to stop de

Re: ForeignKeys and friends interface

2007-04-06 Thread Nebojša Đorđević
Russell Keith-Magee wrote: > However, underneath the name churn, there is an interesting idea - in > your proposal, there is an important difference between "isA" and > "IsMy". It looks like what you are trying to describe is an interface > to the SQL "ON DELETE CASCADE". This could be done with a

Re: ForeignKeys and friends interface

2007-04-06 Thread Michael Radziej
Hi, just a sidetrack comment regarding isA vs. isMy: Russell Keith-Magee schrieb: > However, underneath the name churn, there is an interesting idea - in > your proposal, there is an important difference between "isA" and > "IsMy". It looks like what you are trying to describe is an interface >

Re: ForeignKeys and friends interface

2007-04-06 Thread [EMAIL PROTECTED]
Thanks for your remarks. First of all I'd like to add that I wouldn't dream of replacing the current API. I merely wanted to float the idea of a different API, where relations were described in a more abstract way. As I said I'm a bit of an outsider so I focus on my use case which currently is ra

Re: ForeignKeys and friends interface

2007-04-06 Thread Malcolm Tredinnick
On Fri, 2007-04-06 at 10:07 +, [EMAIL PROTECTED] wrote: > Hello, > > I'm new to Django so please forgive me if my question doesn't make > sense or is addressed in the trunk/active branches. Also I'd like to > start by saying that Django is a great piece of software, and that I > appreciate th

Re: ForeignKeys and friends interface

2007-04-06 Thread Russell Keith-Magee
On 4/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Remarks/trolls/thoughts welcome :) Straight out name churning isn't open for debate. Is ForeignKey the best name for a n-1 relation between models? This is a value judgement, Ultimately, it doesn't matter if ForeignKey is renamed WolfWhi

ForeignKeys and friends interface

2007-04-06 Thread [EMAIL PROTECTED]
Hello, I'm new to Django so please forgive me if my question doesn't make sense or is addressed in the trunk/active branches. Also I'd like to start by saying that Django is a great piece of software, and that I appreciate that a lot of hard work went into it. As an outsider I'm a bit puzzled by