Jorge Godoy, el  5 de agosto a las 10:27 me escribiste:
> 
> "Jorge Vargas" <[EMAIL PROTECTED]> writes:
> 
> > On 8/4/06, Leandro Lucarella <[EMAIL PROTECTED]> wrote:
> >
> >                On svn's SQLObject you can do this:     
> >              nameIndex = DatabaseIndex(firstName, lastName, unique=True)
> >
> >
> >  
> > that's a very nice feature, I hope TG moves there soon.
> 
> It is there already.

The DatabaseIndex type of column is already there, the get() method, is
not. So for now it's just useful to create Database indexes, but not for
geting objects based on that index.

> But note that this is *not* a PK of two columns.  It is a UNIQUE index.
> You'll achieve almost the same thing but when you create a FK to this table it
> will just mention the "id" column. 

That's right, you should think in terms of objects with SQLObject, the id
is like the memory address. Is like you have a pointer when u have a FK.
If you want to add another constraints you can use the other "tools" like
indexes (or check it manually like some suggested here using
getters/setters, like you'll do if you were working with plain objects
without a DB).

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
 .------------------------------------------------------------------------,
  \  GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05 /
   '--------------------------------------------------------------------'
But it was only fantasy.
The wall was too high, as you can see.
No matter how he tried, he could not break free.
And the worms ate into his brain.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to