There are oranges and there are apples.

oranges are arbitrary foreign keys. The problem here is not
implementing them in the DAL. this could be done in a couple of lines
of code. The problem is 1) is this good practice? I think no. 2) how
should SQLFORMs handle this?

apples are "polymorphic references". You can do this using "integer".
I do not see the need for defining another keyword unless you want to
make web2py aware that this integer contains a polymorphic reference.
Assuming this were possible (and it is not in an easy way), what would
you like the DAL to do with it?

Massimo

On Sep 6, 5:02 pm, Joe Barnhart <[email protected]> wrote:
> OK, I'm confused.  Are you suggesting that "reference generic" should be an
> alias for "integer" or that it should be smarter and permit UUIDs and other
> structures?  Is this a beginning of a "foreign key" concept for web2py?
> That might have some pretty extensive usefulness...
>
> On Sun, Sep 6, 2009 at 12:49 PM, Yarko Tymciurak <[email protected]> wrote:
>
> > On Sun, Sep 6, 2009 at 2:45 PM, Joe Barnhart <[email protected]>wrote:
>
> >> I am not against sugary goodness in general, but this seems like something
> >> that might be better handled with education rather than overlaying the name
> >> "integer" with "reference genric".  (Besides, then what would you do with
> >> people who wanted to use UUIDs for their "reference generics" instead of
> >> integers?)
>
> > ... that is my point - why educate on integers, when that's not good
> > education;  hide the implementation into a logical abstraction (generic
> > reference term just being borrowed from Matthew's post).
>
> > Your point about UUIDs sounds more like an agrument _against_ teaching
> > about integers than anything else, to me at least...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
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