On Aug 26, 9:34 am, villas <[email protected]> wrote:
> Specifying Alternative Id Field:  I notice some other frameworks allow
> the developer to specify the name of the Id field in the table
> definition etc.  Something like:  db.primarykey = 'other_id'.  This
> makes it much easier to use with legacy databases,  are there any
> plans to implement that?  The only alternative I could think of would
> be to copy other_id to id with a DB trigger -- could that make sense
> as a work-around?

yes, we are working on it.

> Merging Records:  In Cakephp for example, if you specify the id field
> as char(36) the framework authomatically inserts UUIDs.  This is very
> handy when merging two tables together (e.g. from different DBs).  It
> eliminates the need to specify id ranges for tables to avoid
> 'collisions',  which would of course be a ugly hack, and still
> dangerous (ids could overrun their ranges).  Any ideas for a Web2py
> solution to that?

yes, just "import uuid" and add a field

Field('uuid',default=str(uuid.uuid4()))



> Many thanks.
--~--~---------~--~----~------------~-------~--~----~
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