i guess you just shouldn't override the constructor of DeclartiveBase,
because it did some keyword args magic inside the constructor.

On Jul 12, 12:20 am, "Heston James - Cold Beans"
<[EMAIL PROTECTED]> wrote:
> > if u look up the stacktrace/traceback, u'll see which statement in
> > your own code triggered the error. is it in the mapping-part or is
> > still in table-declaration part?
> > do all 3 tables use same metadata?
>
> Thank you for your comments so far, I appreciate you helping me out on this.
> The entire stack trace is below:
>
> Traceback (most recent call last):
>   File "test.py", line 9, in <module>
>     my_device = post.post("3F8ADE52-4F63-11DD-9AF0-90BB55D89593", "Title",
> "Content")
>   File "/var/lib/python-support/python2.5/sqlalchemy/orm/attributes.py",
> line 1211, in init
>     extra_init(class_, oldinit, instance, args, kwargs)
>   File "/var/lib/python-support/python2.5/sqlalchemy/orm/mapper.py", line
> 798, in extra_init
>     self.compile()
>   File "/var/lib/python-support/python2.5/sqlalchemy/orm/mapper.py", line
> 350, in compile
>     mapper.__initialize_properties()
>   File "/var/lib/python-support/python2.5/sqlalchemy/orm/mapper.py", line
> 371, in __initialize_properties
>     prop.init(key, self)
>   File "/var/lib/python-support/python2.5/sqlalchemy/orm/interfaces.py",
> line 374, in init
>     self.do_init()
>   File "/var/lib/python-support/python2.5/sqlalchemy/orm/properties.py",
> line 467, in do_init
>     self.__determine_joins()
>   File "/var/lib/python-support/python2.5/sqlalchemy/orm/properties.py",
> line 521, in __determine_joins
>     self.secondaryjoin = _search_for_join(self.mapper,
> self.secondary).onclause
>   File "/var/lib/python-support/python2.5/sqlalchemy/orm/properties.py",
> line 514, in _search_for_join
>     return sql.join(mapper.local_table, table)
>   File "/var/lib/python-support/python2.5/sqlalchemy/sql/expression.py",
> line 116, in join
>     return Join(left, right, onclause, isouter)
>   File "/var/lib/python-support/python2.5/sqlalchemy/sql/expression.py",
> line 2275, in __init__
>     self.onclause = self.__match_primaries(self.left, self.right)
>   File "/var/lib/python-support/python2.5/sqlalchemy/sql/expression.py",
> line 2317, in __match_primaries
>     return sql_util.join_condition(primary, secondary)
>   File "/var/lib/python-support/python2.5/sqlalchemy/sql/util.py", line 74,
> in join_condition
>     col = fk.get_referent(a)
>   File "/var/lib/python-support/python2.5/sqlalchemy/schema.py", line 755,
> in get_referent
>     return table.corresponding_column(self.column)
>   File "/var/lib/python-support/python2.5/sqlalchemy/schema.py", line 788,
> in column
>     "foreign key" % tname)
> sqlalchemy.exceptions.NoReferencedTableError: Could not find table 'post'
> with which to generate a foreign key
>
> I've also attached the two modules and the test script I'm trying to use, if
> you wouldn't mind taking a look an letting me know what I'm doing wrong, I
> would really appreciate it.
>
> Cheers,
>
> Heston
>
>  keyword.py
> 1KDownload
>
>  post.py
> 1KDownload
>
>  test.py
> 1KDownload

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to