fixed problem with getNewEntity
added logic so that UPDATE and INSERT statements don't contain dynamic fields