Ticket #1318 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

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

Reported by: alastair Assigned to: 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 (0.9 kB) - added by alastair on 03/07/07 08:36:02.
Add support for SQLAlchemy "InstrumentedList?"

Change History

03/07/07 08:36:02 changed by alastair

  • attachment sqla1.diff added.

Add support for SQLAlchemy "InstrumentedList?"

03/07/07 08:36:49 changed by alastair

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

03/07/07 08:50:26 changed 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.

04/05/07 16:51:38 changed by alberto

Testers please? :)

Alberto

05/01/07 12:57:00 changed by alberto

  • milestone changed from 1.0.2 to 1.0.3.

06/02/07 17:21:58 changed by faide

  • owner changed from anonymous to faide.

06/03/07 09:06:16 changed by faide

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

06/03/07 09:06:24 changed by faide

  • status changed from new to closed.
  • resolution set to fixed.