Hi,

Now I've set the maximum identifier length to 30 chars (thanks!), I
have a new problem.  My Person class inherits from PersonEntry, and
the get() method on Person now fails when passed a single id.  This
seems to be due to the removal of the workaround for #185 in
orm.query.Query._get

I have another example where inheritance works fine.  It seems to fail
in this instance because the table that PersonEntry is mapped to is an
alias.  Should it be possible to set up inheritance from an aliased
table?  It worked in 0.3.6, and the inheritance still works apart from
get() in 0.3.7.

Thanks,

Graham

>>> Person.get([449142, 449142])
John Smith

>>> Person.get_by(id=449142)
John Smith

>>> Person.get(449142)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.3.7-
py2.4.egg/sqlalchemy/ext/assignmapper.py", line 7, in do
    return getattr(query, name)(*args, **kwargs)
  File "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.3.7-
py2.4.egg/sqlalchemy/orm/query.py", line 103, in get
    return self._get(key, ident, **kwargs)
  File "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.3.7-
py2.4.egg/sqlalchemy/orm/query.py", line 916, in _get
    params[primary_key._label] = ident[i]
IndexError: list index out of range


--~--~---------~--~----~------------~-------~--~----~
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