Thank you, Tamas. Yes, that's what I mean. Without you I might have come to believe that something is wrong with my brain...
And yes, I can live with it. It's just a pity that others will stumble on it just because it isn't documented. Luc On 10.02.2010 19:30, Tamas Szabo wrote: > Hi, > > Well, I'm not a django core developer, so my post probably won't weight > that much, but I can't leave Luc with the feeling that that aren't other > people that have the same opinion as him. > Luc, I'm with you on this one :) > > First of all the problem is in an area of handling the mismatches > between the OO and the relational models, an area that should always > cause discussions. So, Luc I guess you have to accept that this is a > gray area and this is how Django's ORM works. Life goes on ... > > On the other hand, I do not understand how you can't see the point that > Luc is making and how can you say that this makes sense from both the ER > and ORM point of view. When you are working with your OO model the > relationship between your models aren't represented by FK pointers. They > should map to attributes of models or collections of models. > FK based relations from the DB are represented by attributes and > collections in the OO world and the ORM should take care of this mapping > and making it transparent. > > In an ideal world you shouldn't use or even know about those _id fields > when working with your OO models. > Your working with your OO domain model that consists of Python classes > and they should work like any other normal Python classes until you use > save or load them (then the ORM kicks in and does the mapping). > But until you do that, they should behave like Python classes so > throwing DoesNotExist Exception when you access an attribute of a class > feels a little bit strange. > > But of course our world is more pragmatic and I can live with the > current implementation (and I hope Luc can do the same), but I can > certainly understand why it feels strange to him and why he resists > using _id fields while working with his models. > > All The Best, > > Tamas > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.