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 #1041 (closed defect: fixed)

Opened 11 years ago

Last modified 10 years ago

[PATCH] Ease use of plain (non-ActiveMapper) sa-classes in identity

Reported by: arnarbi Owned by: anonymous
Priority: normal Milestone: 1.0b1
Component: CherryPy Version: 0.9a6
Severity: normal Keywords:
Cc:

Description

When using custom identity/visit classes with SA that do not use ActiveMapper?, one has to implement "get_by" method on the class to be compatible with the current IdentityProvider?. The following patch removes use of that function and replaces with session.query(...).get_by, which works equally well with non-AM and AM classes.

The patch is against r1676

Attachments

removeactivemapperdeps.r1676.patch Download (1.9 KB) - added by arnarbi 11 years ago.
removeactivemapperdeps.r1676.2.patch Download (3.1 KB) - added by arnarbi 11 years ago.

Change History

Changed 11 years ago by arnarbi

comment:1 Changed 11 years ago by arnarbi

In line 50 of source:trunk/turbogears/visit/savisit.py#1650 there is a reference to visit_class.table, which is a variable provided by ActiveMapper? as well. This needs to be removed also.

Changed 11 years ago by arnarbi

comment:2 Changed 11 years ago by arnarbi

The patch now also fixes the visit_class.table probelm in savisit.py

comment:3 Changed 11 years ago by joelpearson

The "removeactivemapperdeps.r1676.2" patch works for me, and also resolved #1096 as well.

comment:4 Changed 11 years ago by kevin

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 1.0b1

committed in [1848]. Thanks!

Note: See TracTickets for help on using tickets.