Issue with BOs inheriting from the same base BO


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
That was exactly what I was trying to relay but I apparently did not get the point across.  In all of the examples that I gave you I used BO2 and BO2, but the same thing comes into play if the BaseBO ever references this field outside of a strong-typed property and then through a strong-typed property on any downstream call.  So you ultimately got the problem fixed, but it was just in a different object that my examples were stating.

As for this being resolved in 1.6.6, I was referrring to the template having this logic within it.  But the exact same problem would occur if you setup the same scenario.  We could re-evaluate every custom property, on every BO, on every reference...but this would drastically impact performance (in a negative way) as the custom properties only need to be evaluated once.  The problem comes (and this is standard .NET) when inheritance comes into play.  Because through reflection, we have an inherited BO that has a custom property (i.e. MyField) which gets evaluated properly.  But if the BO in which it is inherited ever references this field even through a CurrentRow reference, the BO will have an issue the moment the second BO is brought up as it will try to evaluate that custom property incorrectly (or rather .NET will through reflection).  So by placing the custom property on the lowest common denominator BO that will ever access that property, it will resolve the problem.

Andria Jensen
Andria Jensen
StrataFrame User (464 reputation)StrataFrame User (464 reputation)StrataFrame User (464 reputation)StrataFrame User (464 reputation)StrataFrame User (464 reputation)StrataFrame User (464 reputation)StrataFrame User (464 reputation)StrataFrame User (464 reputation)StrataFrame User (464 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I have run into this error message again, and this time cannot find the root of it.  I have spent countless hours trying to track it down, and now need a little bit of guidance if possible.

I have gotten this before, and it has always been a case of two inherited BOs having the same cutom property and having to move that custom property up to the base BO.  Or it has been a case of wrongly accessing the base BO property or inherited BO property at a level it shouldn't be.  Well, I can't see that's the case with my current situation.

I have it narrowed down to the following recreation:
- There are two BOs, BO2 which inherits from the base BO1.
- I have form1 which only houses a BO2 instance.
- I have from2 which only houses a grid that connects to a BBS which uses BO1 as its source.
- If I open form1, then open form2, the from loads and the grid populates but as soon as I go off that form or do anything else, I get the "object does not match target type" error.

Now, I have searched for any commonly named properties. I have actually commented out every custom property at the base level (BO1) and still get the problem. I only have two custom properties on BO2, which are only accessed through BO2. 

So my question is basically this:  is there any other circumstance in which this error may occur that hasn't already been covered in this ticket?  I've lost a few days on this error and now just have no idea of where to go with it.  Please offer any help you can, it will be much appreciated.  Thanks!!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search