LLBLGen v.2.0.0.0 / .NET 2 / Adapter
Hi guys.
I'm playing around with the update restriction predicate that can be passed to the Adapter.SaveEntity method. I have the following objects:
Airplane with one property IsTakingOff
Passenger with one property IsInWashRoom
There is a 1:m Relation between Airplane and Passenger. Now there should be an update restriction so that the property Airplane.IsTakingOff cannot be set to true as long as any passengers are in the washrooms.
Airplane.IsTakingOff = true;
PredicateExpression predicate = new PredicateExpression();
predicate.Add(PassengerFields.IsInWashRoom == false);
mAdapter.SaveEntity(Airplane, true, predicate, true);
It throws the following exception at runtime:
_
System.Data.SqlClient.SqlException
The multi-part identifier "xxx.dbo.Passenger.IsInWashRoom" could not be bound.
_
Apparently, I misunderstand something. How can I check the state of linked entities when saving an entity?
Thanks in advance for your help!