Added magic method for entities