I've gotten around trying 1177 now, and the definition of the relationship does
not break inheritance. But when trying to operate the data-model I now get:
line 286, in visit_select
orderby = "%s.rowid ASC" % select.froms[0].name
AttributeError: 'JoinMarker' object has no attribute 'name'
which was working as well in 1117. Below the full traceback.
File
"/usr/local/lib/python2.4/site-packages/CherryPy-2.1.1-py2.4.egg/cherrypy/_cphttptools.py",
line 271, in run
main()
File
"/usr/local/lib/python2.4/site-packages/CherryPy-2.1.1-py2.4.egg/cherrypy/_cphttptools.py",
line 502, in main
body = page_handler(*args, **cherrypy.request.paramMap)
File
"/usr/local/lib/python2.4/site-packages/TurboGears-0.8.9-py2.4.egg/turbogears/controllers.py",
line 124, in newfunc
output = func(self, *args, **kw)
File "/home/florian/shop_ng/shop/shop/platforms/symbian.py", line 91, in
test_index
return self.index(imei, key, realimei, version, device)
File
"/usr/local/lib/python2.4/site-packages/TurboGears-0.8.9-py2.4.egg/turbogears/controllers.py",
line 124, in newfunc
output = func(self, *args, **kw)
File "/home/florian/shop_ng/shop/shop/platforms/symbian.py", line 105, in
index
return self.parent.linklist.default('symbian index') #FIXME
File "/home/florian/shop_ng/shop/shop/platforms/base.py", line 45, in default
item = self.query(identifier)
File "/home/florian/shop_ng/shop/shop/platforms/base.py", line 96, in query
return orm.linklists.get_by_name(linklist_name)
File
"/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/sqlalchemy/mapping/mapper.py",
line 474, in foo
return self.get_by(**{key:arg})
File
"/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/sqlalchemy/mapping/mapper.py",
line 392, in get_by
x = self.select_whereclause(self._by_clause(*args, **params), limit=1)
File
"/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/sqlalchemy/mapping/mapper.py",
line 513, in select_whereclause
return self._select_statement(statement, params=params)
File
"/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/sqlalchemy/mapping/mapper.py",
line 533, in _select_statement
return self.instances(statement.execute(**params), **kwargs)
File
"/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/sqlalchemy/sql.py",
line 435, in execute
c = self.compile(e, parameters=bindparams)
File
"/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/sqlalchemy/sql.py",
line 420, in compile
compiler.compile()
File
"/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/sqlalchemy/sql.py",
line 322, in compile
self.statement.accept_visitor(self)
File
"/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/sqlalchemy/sql.py",
line 1344, in accept_visitor
f.accept_visitor(visitor)
File
"/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/sqlalchemy/sql.py",
line 979, in accept_visitor
self.selectable.accept_visitor(visitor)
File
"/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/sqlalchemy/sql.py",
line 1351, in accept_visitor
visitor.visit_select(self)
File
"/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/sqlalchemy/databases/oracle.py",
line 286, in visit_select
orderby = "%s.rowid ASC" % select.froms[0].name
AttributeError: 'JoinMarker' object has no attribute 'name'
Quoting Michael Bayer <[EMAIL PROTECTED]>:
> try out 1166.
>
> On Mar 17, 2006, at 6:11 PM, Florian Boesch wrote:
>
> > Michael,
> >
> > I've tried on the current trunk (r1164) but it's still not working
> > for me.
> > Atached you'll find my test programm.
> >
> > Cheers,
> > Florian
> >
> > Quoting Michael Bayer <[EMAIL PROTECTED]>:
> >
> >> florian -
> >>
> >> i have managed to reproduce what is probably the problem youre
> >> having, and made even more modifications to inheritance to more
> >> accurately determine join conditions, relationship directions, and
> >> syncrules. give the trunk a try.
> >>
> >> - mike
> >>
> >> On Mar 17, 2006, at 10:46 AM, Florian Boesch wrote:
> >>
> >>> Was working with revision 1117 successfully. Now I updated to the
> >>> downloadable
> >>> version 0.1.4 and it breaks on me at a line resmebling:
> >>>
> >>> B.mapper = sqla.mapper(B, b, inherits=a)
> >>>
> >>> I also tried with the current trunk, same result. Below the
> >>> traceback.
> >>>
> >>> Traceback (most recent call last):
> >>> File "./start-shop.py", line 20, in ?
> >>> from shop.controllers import Root
> >>> File "/home/florian/shop_ng/shop/shop/controllers.py", line 3,
> >>> in ?
> >>> from shop import platforms, tools, mandator, oracle_session
> >>> File "/home/florian/shop_ng/shop/shop/tools.py", line 2, in ?
> >>> from shop.application import model
> >>> File "/home/florian/shop_ng/shop/shop/application/__init__.py",
> >>> line 1, in ?
> >>> from sqla import orm, model
> >>> File "/home/florian/shop_ng/shop/shop/application/sqla/orm.py",
> >>> line 31, in ?
> >>> products = sqla.mapper(Product, model.product,
> >>> inherits=contents)
> >>> File
> >>> "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/
> >>> sqlalchemy/mapping/__init__.py",
> >>> line 55, in mapper
> >>> return Mapper(class_, table, *args, **params)
> >>> File
> >>> "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/
> >>> sqlalchemy/mapping/mapper.py",
> >>> line 187, in __init__
> >>> prop.init(key, self)
> >>> File
> >>> "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/
> >>> sqlalchemy/mapping/mapper.py",
> >>> line 859, in init
> >>> self.do_init(key, parent)
> >>> File
> >>> "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/
> >>> sqlalchemy/mapping/properties.py",
> >>> line 189, in do_init
> >>> self.direction = self._get_direction()
> >>> File
> >>> "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.4-py2.4.egg/
> >>> sqlalchemy/mapping/properties.py",
> >>> line 238, in _get_direction
> >>> raise ArgumentError("Cant determine relation direction")
> >>> sqlalchemy.exceptions.ArgumentError: Cant determine relation
> >>> direction
> >>>
> >>> Cheers, Florian
> >>>
> >>>
> >>> -------------------------------------------------------
> >>> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> >>> language
> >>> that extends applications into web and mobile media. Attend the
> >>> live webcast
> >>> and join the prime developer group breaking into this new coding
> >>> territory!
> >>> http://sel.as-us.falkag.net/sel?
> >>> cmd=lnk&kid=110944&bid=241720&dat=121642
> >>> _______________________________________________
> >>> Sqlalchemy-users mailing list
> >>> [email protected]
> >>> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
> >>
> >>
> >>
> >> -------------------------------------------------------
> >> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> >> language
> >> that extends applications into web and mobile media. Attend the
> >> live webcast
> >> and join the prime developer group breaking into this new coding
> >> territory!
> >> http://sel.as-us.falkag.net/sel?
> >> cmd=lnk&kid=110944&bid=241720&dat=121642
> >> _______________________________________________
> >> Sqlalchemy-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
> >>
> >>
> >
> >
> > <inheritance_test.py>
>
>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users