Just wondering if there's any way to load an entity via a unique constraint when the unique constraint in on an abstract base type in an inheritance chain and you're unsure which subclass the unique value will load up.
The docs have:
DataAccessAdapter adapter = new DataAccessAdapter();
CustomerEntity customer = new CustomerEntity();
customer.CompanyName = "Chop-suey Chinese";
adapter.FetchEntityUsingUniqueConstraint(customer, customer.ConstructFilterForUCCompanyName());
Line 2 obviously isn't possible though when the entity is abstract so you end up having to do something like.
DataAccessAdapter adapter = new DataAccessAdapter();
CustomerEntity customer = (CustomerEntity)adapter.FetchNewEntity(new CustomerEntityFactory(), new RelationPredicateBucket(CustomerFields.CompanyName == "Chop-suey Chinese"));
This just instantiates a CustomerEntity even when the database row doesn't exist. Which is kind of weird given the entity is marked as abstract in the designer. Any thoughts?