Hello,

I have this table:

class Region(rdb.Model):
        """Represents one region in the layout"""
        rdb.metadata(metadata)
        rdb.tablename("regions")

        id = Column("id", Integer, primary_key=True)
        title = Column("title", String(50))

        ......
        channelId = Column("channel_id", Integer, ForeignKey("channel.id"))

        channel = relationship("Channel", uselist=False, backref="regions")

One region can just contain one channel, but one channel could be in
many regions. A region will never be accessed by a channel. However,
Channel could be accessed by a region, so I need that relationship in
region. Is that relationship OK? If not, how can I make it?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to