I was wondering if the limit on one primary key field only was coming 
out of the "encouraging of clean design" or was just a technical limitation.

I have some classes in my "legacy" app that are uniquely identified by 
two or more attributes, and I was just catching db layer exception when 
the user tried to insert something already there, wrapping them in "user 
error exceptions".

Now when saving I have to search for an equivalent object and in the 
case is found abort the save and throw the error.

Was something I miss in the first method wrong ? Or I miss something 
from django framework which allows me to solve the problem in a more 
elegant way ?


PS: Of course catching / wrapping exception in java is still more lines 
than doing an if/else in python, so maybe the answer is "stop being anal 
about concise code" :)

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to