Using 4.1 March 12th build.
SubDetailEntity is subtype of DetailEntity.
Trying to do a batch update on the subtype, this code
var filter = new RelationPredicateBucket(SubDetailFields.OrderId == 12345);
Adapter.UpdateEntitiesDirectly(new SubDetailEntity{ Field = false }, filter);
produces this SQL
UPDATE [SubDetail]
SET [Field] = @p1
WHERE ((([Detail].[OrderId] = @p2)))
which fails with error
The multi-part identifier "Detail.OrderId" could not be bound.
because there is no JOIN with the supertype.
But when I filter on the PK of the subtype (and supertype)
var filter = new RelationPredicateBucket(SubDetailFields.Id == 54321);
Adapter.UpdateEntitiesDirectly(new SubDetailEntity{ Field = false }, filter);
then this SQL is generated
UPDATE [SubDetail]
SET [Field] = @p1
FROM ( [Detail]
LEFT JOIN [SubDetail]
ON [Detail].[Id] = [SubDetail].[Id])
WHERE ((([SubDetail].[Id] = @p2)))
in which the FROM with JOIN is not really necessary in my opinion.