Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1318 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

[PATCH] @paginate doesn't support SQLAlchemy list properties

Reported by: alastair Owned by: faide
Priority: normal Milestone: 1.0.3
Component: SQLAlchemy Version: 1.0
Severity: normal Keywords:
Cc:

Description

If you have a class that has a one-to-many or many-to-many relationship mapped using SQLAlchemy, such that that class has an attribute that appears to be a list of objects, and you pass the value of that attribute through @paginate, it gives the error

Variable is not a list or SelectResults

because sqlalchemy.orm.attributes.InstrumentedList does not derive from list.

This patch fixes the problem.

Attachments

sqla1.diff Download (930 bytes) - added by alastair 12 years ago.
Add support for SQLAlchemy "InstrumentedList?"

Change History

Changed 12 years ago by alastair

Add support for SQLAlchemy "InstrumentedList?"

comment:1 Changed 12 years ago by alastair

(I suppose it might be relevant to reference #1115 here.)

comment:2 Changed 12 years ago by alastair

  • Summary changed from @paginate doesn't support SQLAlchemy list properties to [PATCH] @paginate doesn't support SQLAlchemy list properties

Make it clear there's a patch attached.

comment:3 Changed 12 years ago by alberto

Testers please? :)

Alberto

comment:4 Changed 12 years ago by alberto

  • Milestone changed from 1.0.2 to 1.0.3

comment:5 Changed 12 years ago by faide

  • Owner changed from anonymous to faide

comment:6 Changed 12 years ago by faide

applied in trunk and 1.0 (r3064 & r3065) thanks Alastair.

comment:7 Changed 12 years ago by faide

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.