I would say that the extension is intended to replace SqlSoup in the
future, but may not be ready for that quite yet.

Simon

On Tue, Mar 25, 2014 at 12:39 AM, Bao Niu <niuba...@gmail.com> wrote:
> Compare to SQLsoup, is this extension more recommended?
>
>
> On Mon, Mar 24, 2014 at 3:32 AM, Simon King <si...@simonking.org.uk> wrote:
>>
>> On Mon, Mar 24, 2014 at 6:48 AM, Bao Niu <niuba...@gmail.com> wrote:
>> > Suppose we have two tables in an existing database, "user" and
>> > "address".
>> > There is a one-to-many relationships between these two tables with a
>> > foreign
>> > key user.id==address_user_id.
>> > Now we *reflect* this schema directly from the database:
>> >
>> > from sqlalchemy.ext.declarative import declarative_base
>> > Base = declarative_base(E)
>> >
>> > Class User(Base):
>> >     __tablename__ = 'user'
>> >     __table_args__ = {'autoload': True}
>> >     addresses = sqlalchemy.orm.relationship("Address",  backref="user")
>> >
>> > Class Address(Base):
>> >     __tablename__ = 'address'
>> >     __table_args__ = {'autoload': True}
>> >
>> > To me, it is a mystery why the almighty SA can autoload everything, but
>> > not
>> > an obvious relationship (in red ink). What benefit is it for the user to
>> > manually define such a simple and unambiguous relationship? Can't it be
>> > automatically done, i.e., leaving out the red part?
>> > Will this feature likely be included in future versions, say, sqlalchemy
>> > 1.0?
>> >
>>
>> You might be interested in the experimental automap extension:
>>
>>   http://docs.sqlalchemy.org/en/rel_0_9/orm/extensions/automap.html
>>
>> Hope that helps,
>>
>> Simon
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "sqlalchemy" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/sqlalchemy/_q1tBBfTh0w/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> sqlalchemy+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to sqlalchemy@googlegroups.com.
>> Visit this group at http://groups.google.com/group/sqlalchemy.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to