#2213: Reflection tables on model for tg2.
---------------------------+------------------------------------------------
 Reporter:  beyonlo        |        Owner:  Chris Arndt
     Type:  task           |       Status:  new        
 Priority:  normal         |    Milestone:  2.0rc1     
Component:  Documentation  |      Version:             
 Severity:  normal         |   Resolution:             
 Keywords:                 |  
---------------------------+------------------------------------------------
Changes (by jorge.vargas):

  * owner:  faide => Chris Arndt
  * component:  TurboGears => Documentation

Old description:

> Hello,
>
> In tg1 I use mapper in model.py to do a reflect tables from database to
> SqlAlchemy (SA). With this relflect don't needs create all columns in
> model again, because talbles already created in database. But in TG2 I
> try the same, like as working in tg1, but not works for me.
>
> In tg1 I was do for example in model.py:
> cadcar_table         = Table('cadcar',         metadata, autoload=True,
> schema="car")
> class Cadcar(object):
>     pass
> mapper(Cadcar, cadcar_table)
>
> But this (reflect) not works in tg2. I Would like know how I do this in
> tg2, like as in tg1.
>
> Thank you!

New description:

 Hello,

 In tg1 I use mapper in model.py to do a reflect tables from database to
 SqlAlchemy (SA). With this relflect don't needs create all columns in
 model again, because talbles already created in database. But in TG2 I try
 the same, like as working in tg1, but not works for me.

 In tg1 I was do for example in model.py:
 {{{
 cadcar_table = Table('cadcar',metadata, autoload=True, schema="car")
 class Cadcar(object):
     pass
 mapper(Cadcar, cadcar_table)
 }}}

 But this (reflect) not works in tg2. I Would like know how I do this in
 tg2, like as in tg1.

 Thank you!

Comment:

 This seems like something we need to clarify rather than fix.

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2213#comment:3>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to