I think to help you better we should see some piece of code...

Paticularily the IS_NOT_IN_DB()...

About the idea of having UUID or even just a plain string combining the id
(which you already have anyway in your case as far as I understand it), I
did that in the pass to validate uniqueness of multipile table ID
combination... I should have a look at the code to remember exactly what
was the problem... But basically I was combining multiple primary key
candidate (real word primary that need to be combine to get a real
effective primary key) into a string field to assert that they were
effectively unique this combination was include a foreign key also if I
remember... It was not the best design, but it fit the business process
that they won't change, so...

In your case, if you only use the list:reference field programmatically and
you sort your selected IDs before input them unique=True and IS_NOT_IN_DB()
should be sufficient...

But we need to see the code to make you are doing the right thing...

Richard

On Fri, Jan 22, 2016 at 5:38 AM, Pierre <[email protected]> wrote:

> What is unclear is at what level uniqueness should be enforced ?
> database, form, web2py commands  ?
>
> unique=True is at database level but it throws a ticket (in case web2py
> attempts to duplicate a record) so I suppose this is not wanted once the
> app is deployed
> Is it good/efficient  to use  validate_and_insert    or   update_or_insert
> to check uniqueness at web2py level and can these commands be combined with
> unique=True (prevent ticketing) ?
>
> --
> 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.
>

-- 
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