By Daniel Essin - 12/14/2005
In a form, when trying to set the parent of a child object I get the error in Set Parent (attached). When I follow its instructions and go to the designer of the Child Object and attempt to set the parent I get the error in (Cannot Set Parent.
How do I get out of this loop?
|
By StrataFrame Team - 12/14/2005
The first message you are receiving because you tried to set the parent business object on another business object at the class level. While you only have to configure the parent relationship a single time in the component designer for the business object (at the class level), the component designer's changes affect all instances of a business object, and therefore, we do not allow you to set the actual parent business object instance there. You'll need to set the parent business object instance at the instance level of the child business object.
As for the second message... if you've rebuilt your project and you are still not able to set the parent business object at the instance level, then the VSTypeResolutionService is failing because the assembly did not refresh within the DTE when you rebuilt the project. Restarting Visual Studio will clear the AppDomain, thereby refreshing the cached assembly and will let you set the parent business object.
|
By Daniel Essin - 12/15/2005
I'm confused. The first error was the result of trying to "configure the parent relationship a single time in the component designer for the business object (at the class level)". I was not trying to set to an instance, nor did I even get the chance. The error appeared the instant that I clicked on the dropdown error at the right side of the ParentBusinessObject. It says "You cannot set the ParentBusinessObject property within the component designer for a business object".
I got the second error because the first operation, which I think is what you just said I should do, was not allowed.
Rebuilding and closing/opening have had no effect on these errors.
There must be some fundamental point that I do not understand.
|
By StrataFrame Team - 12/15/2005
Ah, there are two properties: ParentBusinessObject and ParentRelationship. The ParentRelationship is configured at the class level through the component designer. Once you have set the ParentRelationshp property, you go to the individual instance of the child business object you want to set the parent on, and there, you set the ParentBusinessObject. The two properties work closely together, one to define the relationship, one to set the actual instance that is the parent.
|
By Daniel Essin - 12/16/2005
I see.
|
|