Hi,
I think this is a dumb question, but I really did'nt find the answer here yet
.
I have a CompanyCar (with general fields) and a specialized FamilyCar (with some particular fields) entity (a sub-type in the LLBLGen), then in someplace of the workflow a method receives the CompanyCar and need to create a specialized FamilyCar. But, at this step in the FamilyCar sql table there is no data yet, the step is to create it.
What's the best way to create a sub-type instance?
I've tried the following:
public void StartFamilyCarWorkflow(CompanyCarEntity companyCar)
{
FamilyCarEntity familyCar = new FamilyCarEntity(companyCar.carId);
...
}
and
public void StartFamilyCarWorkflow(CompanyCarEntity companyCar)
{
FamilyCarEntity familyCar = (FamilyCarEntity)CompanyCarEntity.FetchPolymorphic(null,companyCar.carId, null);
...
}
But with both code de familyCar instance does not come with the companyCar fields filled.
I should do it manual, like:
familyCar.Color = companyCar.Color;
familyCar.Type = familyCar.Type;
...
...
Or there is a best way to do it? Or it should be filled and I'm doing something wrong?
Thanks