composite id query clause fix