change entity constructor to loop through passed data and do a set on each, otherwise setData() just sets the raw data