Russell Keith-Magee wrote:
> In addition, your alternative would have 'X = article.reporter_set'
> provide useful data, but 'article.reporter_set = X' throw an exception
> - this asymmetry strikes me as much more confusing than the absence of
> strict name binding.

This is a good point, but at least exceptions are hard to miss.
Anyway, I will shut up on this now.

> > > 4) Reverse descriptors and save() have an interesting relationship. Given:
> >
> > > a) make add()/remove()/clear()/__set__ implicit save points. This
> >
> > Would there be a way to create non-persistent instances with relations?
>
> I agree that its an interesting use case, but it seems to be
> restricted in the existing implementation (trunk and existing MR). How
> do you create a temporary object with an m2m relation? m2m relations
> are committed to the database table as soon as you add them. If both
> objects haven't been saved/don't have a primary key, adding the
> relation throws an exception.

Yeah the restriction to objects without m2m relations does exist in
trunk, but it is still a restriction.

I also agree with Ivan that it seems confusing to sometimes have
explicit save and sometimes implicit.  I think an ORM is easier to
reason with if it is one or other.

If you are going with (a) though might it be possible to have a flag on
the model disabling database writes?

Kieran


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to