I am using DataAccessAdapter.UpdateEntitiesDirectly by(pseudocode):
bucket = new RelationPredicateBucket({{PREDICATE}});
bucket.Relations.Add(ParentTableEntity.Relations.ChildTableEntityUsingParentTableId, "UPDATE_ALIAS", JoinHint.Inner);
bucket.Relations.Add(ParentTableEntity.Relations.ChildTableEntityUsingParentTableId, "JOIN_ALIAS", JoinHint.Inner);
bucket.SelectListAlias = "UPDATE_ALIAS";
var updateEntity = new ChildTableEntity
{
ChildField = "SOME_NEW_VALUE"
};
using var adapter = new DataAccessAdapter();
adapter.UpdateEntitiesDirectly(updateEntity, bucket);
The generated sql is(pseudocode):
UPDATE ChildTable
SET {{VARIOUS_FIELDS}}
FROM ParentTable INNER JOIN ChildTable [UpdateAlias] ON {{CONDITIONS}}
INNER JOIN ChildTable [JoinAlias] ON {{CONDITIONS}}
WHERE {{CONDITIONS}}
But what I need is(pseudocode):
UPDATE [UpdateAlias]
SET {{VARIOUS_FIELDS}}
FROM ParentTable INNER JOIN ChildTable [UpdateAlias] ON {{CONDITIONS}}
INNER JOIN ChildTable [JoinAlias] ON {{CONDITIONS}}
WHERE {{CONDITIONS}}
Thank you very much for any assistance!