You cannot do it. I do not consider this a good software engineering
practice. You reference a record, not a field. The record should
therefore be referenced by its unique id.

Different is the issue of representing the reference field. You can
make a join and display codice instead of id in  views.

Massimo

On Nov 28, 9:28 am, pmate <[EMAIL PROTECTED]> wrote:
> Thanks for your quick replay.
> My problem is there: i don't want the relation on id of violazioni
> because if i delete a record the id sequence would change. For example
> in violazioni:
> id codice violazione
> 1  1         something
> 2  2         other thing
> 3  3         an other thing
>
> Well, if i delete id nr.2 of violazioni and insert a new record, i
> want:
> 1  1         something
> 3  3         an other thing
> 4  2         new insert
>
> so that i can choose my codice value (to be related on records of
> table sanzioni (one to many) and not to be forced to have them
> incremented like in field id would be.
>
> Hope to be clear...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to