One to may relation and list widget with filter problem

10 views
Skip to first unread message

Sergejs Smirnovs

unread,
Aug 29, 2010, 12:51:35 PM8/29/10
to diem-users
I`ve got schema:

Gallery:
columns:
title: { type: string(120), notnull: true }
directory: { type: string(120), notnull: false }
is_active: { type: boolean, notnull: true, default: false }
folder_id: { type: integer, notnull: true }
category_id: { type: integer, notnull: true }

relations:
dmMediaFolder: { onDelete: CASCADE, local: folder_id, foreign: id,
foreignAlias: Gallerys }
category: { local: category_id, foreign: id, foreignAlias:
Gallerys }
Category:
columns:
title: { type: string(120), notnull: true }

and modules.yml:
gallery:
name: Gallery|Galleries
page: true
components:
list: {cache: true}
listByCategory: {cache: true, filters: category}
show: {cache: true}
category:
name: Category|Categories
components:
list: {cache: true}
page: true

trying to add listByCategory to page - receving exception: "Diem can
not filter gallery by category"

What i`m doing wrong ? :)

Maciek

unread,
Aug 30, 2010, 6:02:19 AM8/30/10
to diem-users
I think you miss 'class' in definition of relation
category: { local: category_id, foreign: id, foreignAlias: Gallerys,
class: Category }
Reply all
Reply to author
Forward
0 new messages