Hello Anthony,

I have a table with a couple of reference fields and I want this couple to 
be unique. This table doesn't use form so fields values are inserted 
programmatically and the smallest value goes to the first reference field: 
ex if  a==10 and  b==5     b is inserted in first_reference field and a in 
second reference field
It fails either with a integrity psycopg2 error whenever I use unique=True 
or it does nothing to prevent replication when I use IS_NOT_IN_DB()  ( here 
I grouped the ref fields in a single list:reference )
I investigated a little and It seems I might be able to resolve this with 
the UUID python module ( generate a unique COUPLE_ID value from every 
couple and force uniqueness with a IS_NOT_IN_DB() validator applied to this 
field )

Is it OK or is it "bad programming" to manage this with UUID ?


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to