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 /

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

Detecting DataList Type

Go to End

2 Posts   667 Views


Community Member, 8 Posts

5 May 2014 at 3:21pm

This is probably some thing fairly easy but I can't wrap my mind around it. I am trying to put some condition based on whether a datalist is a HasManyList ot ManyManyList. For example, my debug output has ...


ClassName =


Created =

2014-01-22 00:39:28


How do I figure out if the list is a ManyManyList or a HasManyList such as

if(ManyManyList) ...

elseif (HasManyList) ...

Thanks in advance


Community Member, 473 Posts

5 May 2014 at 4:05pm

if ($list instanceof ManyManyList) {

} else if($list instanceof HasManyList) {