#2 added proper handling of collections with eav entities