updated setAsArray in BaseEnity.java