Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Uploadify import image removes image from other page


Go to End
Reply


10 Posts   2448 Views

Avatar
klikhier

Community Member, 150 Posts

10 March 2011 at 9:42am

Actually, one final Q:

Does it needs to be Pages or Page: (both seem to work)

class Photo extends Image {

static $belongs_many_many = array (
'Pages' => 'Page'
);

}

or

class Photo extends Image {

static $belongs_many_many = array (
'Page' => 'Page'
);

}

Avatar
UncleCheese

Forum Moderator, 4096 Posts

10 March 2011 at 10:03am

Yeah, the key in the array is an arbitrary name for the relationship, so it won't make a difference. The value 'Page' is important because it has to refer to a data class.

To answer your question, though, as a matter of convention, it should be plural, since it returns a DataObjectSet.

'Pages' => 'Page'

Go to Top