2011/9/14 sk78 <[email protected]>:
>
> Hi,
>
> I've been trying to import a predefined database in the model.py file.
> All the examples I have found use assign_mapper that seems to be depracated
> and does not work.
> My code is the following:

Hello,

when you say I tried to import a predefined database, I guess you mean :
* I want tg to reflect a database that already exists and I want my
model to be the closer to the already defined physical data

if and only I understood well, here are 3 methods that works :

All these solutions require ForeignKey/primary key

I tried successfully the undocumented experimental, it works for me TM
sqlalchemy migrate :
http://groups.google.com/group/migrate-users/browse_thread/thread/a5605184e08abf33#msg_85c803b71b29993f

I tried succesfully
http://www.sqlalchemy.org/docs/orm/extensions/sqlsoup.html
for database that changes

I also successfully used
http://code.google.com/p/sqlautocode/

I lastly prefered rewrtiing my 120 colums / 10 tables model by hand.

-- 
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?hl=en.

Reply via email to