10389 Posts in 2200 Topics by 1712 members
| Go to End | ||
| Author | Topic: | 1851 Views |
-
Re: Uploadify import image removes image from other page

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'
);}
-
Re: Uploadify import image removes image from other page

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'
| 1851 Views | ||
| Go to Top |

