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.

Data Model Questions

Decorating Member class


2 Posts   820 Views

Ryan M.

26 February 2011 at 5:54pm Community Member, 309 Posts

When you're decorating the Member class with your own stuff, do you need to refer to the new member class from then on or can you continue using 'Member'?

For example, suppose I have a Photo object and each Photo is owned by a member. Do I need to do this:

public static $has_one = array(
'Member' => 'MyMember'

or would this still work:

public static $has_one = array(
'Member' => 'Member'

I feel rather silly for asking this but I haven't decorated the Member class much in the past.


26 February 2011 at 9:49pm Forum Moderator, 5511 Posts

You can still refer to it as a Member. Decorators are transparent.