Code

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#1774 closed defect (invalid)

mis computed ref in filters for manytomany

Reported by: bo@… Owned by: adrian
Component: Database layer (models, ORM) Version:
Severity: critical Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

using QuerySet filter in the newest svn tree (as of May 5 2006)

a Manytomany filter

Q = Item.objects.filter({manytomanyfield} = {ManyToManyObj})

results in a SQL error of
Unknown column 'm2m_{site}_item{manytomanfield}.{manytomany} = {id}' in 'where clause'

the SQL should be m2m_{site}_item{manytomanfield}.{manytomany}_id = {id}

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by adrian

  • Resolution set to invalid
  • Status changed from new to closed

filter() doesn't take many-to-many objects as parameters. You'll have to select based on the ID of the object you're looking for.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.