Google Groups

Re: [Elgg development] extending ElggEntity, properties as new type table or as metadata

Brett Profitt Mar 12, 2012 10:45 AM
Posted in group: Elgg development
If you don't need to use title and description for ElggObject you don't have to. Creating a top level type just to remove those fields is a lot of work with no gain.

I would almost never advise someone to create a new entity type, and then only after we've done profiling and have identified metadata fields that would be better served as attributes in the type table. The implementation would be basically copying any of the core type objects and creating corresponding tables with attributes that match those defined in the object.

Again, only in a very rare case would this be a solution.

On Mon, Mar 12, 2012 at 8:35 AM, Krishna Shetty <> wrote:
I am thinking to extend ElggEntity because, for my requirements, the 'title' and 'description' properties of ElggObject are not required.

So, when creating new entity type, is it good to create the required properties as new type table(like how ElggObject does for 'title' and 'description' properties) or just allow them to be saved as metadata(without declaration in initializeAttributes )?

I think mandatory properties can be declared in the new entity type, other than this, is there any advantages/disadvantages in saving properties as new type table or as metadata.

Thank you.

You received this message because you are subscribed to the Google
Groups "Elgg development" group.
To post to this group, send email to
To unsubscribe from this group, send email to
Remember, bug reports should be filed at!

Brett Profitt
Elgg Lead Developer

Skype: brett.profitt