PgEntity - big rework.