Hello,

I have two tables which looks like

class CI_OnlineResource(object):
        def __init__(self):
                super(CI_OnlineResource, self).__init__()
                self.applicationProfile = None
                self.function = None

 class MO_OnlineResource(CI_OnlineResource):
        def __init__(self):
                super(MO_OnlineResource, self).__init__()
                self.function = None
                self.applicationProfile = None

the two classes contains the same attributes (function,
applicationProfile) because in "my" specifications is required that
1) MO_OnlineResource.applicationProfile is a String
2) MO_OnlineResource.applicationProfile is an ENUM of String type

So at this moment I have

mo_onlineresource_table = Table('mo_onlineresource', metadata,
        Column('mo_onlineresource_id', Integer,
Sequence('mo_onlineresource_id_seq'), primary_key=True),
        Column('function', MO_OnLineFunctionValue.db_type(), nullable=False),
        Column('applicationProfile', MO_ApplicationProfileValue.db_type(),
nullable=False),
        Column('mo_onlineresource_type', String(30), nullable=False),
        extend_existing=False,)


ci_onlineresource_table = Table('ci_onlineresource', metadata,
        Column('ci_onlineresource_id', Integer,
Sequence('ci_onlineresource_id_seq'), primary_key=True),
        Column('applicationProfile', TEXT()),
        Column('function', CI_OnLineFunctionCode.db_type()),
        extend_existing=False,)

where "db_type" is a @classmethod I use to define the ENUM type.


mapper(CI_OnlineResource, ci_onlineresource_table)
mapper(MO_OnlineResource,
mo_onlineresource_table.join(ci_onlineresource_table))

Obviously running such script I obtain the following error

sqlalchemy.exc.InvalidRequestError: Implicitly combining column
mo_onlineresource.applicationProfile with column
ci_onlineresource.applicationProfile under attribute
'applicationProfile'.  Please configure one or more attributes for
these same-named columns explicitly.

Anyone has an idea how get out of this situation?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@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