use isScheduledForInsert to check if the entity is retrieved from database or not.