Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Glad you got it worked out.
|
|
|
Aaron Young
|
|
Group: StrataFrame Users
Posts: 277,
Visits: 1.1K
|
Got there It works when MyBaseBO is NOT mapped in the BO Mapper and MyInheritedBO is mapped. No big deal in the end Thanks for the help.
|
|
|
Aaron Young
|
|
Group: StrataFrame Users
Posts: 277,
Visits: 1.1K
|
Using your sample class names, I lose the ParentRelationship when I use the Business Object Mapper to map the MyBaseBO to a table in my DDT. As soon as I do that, I can nolonger see the ParentRelationship in MyInheritedBO. As I would like to store all my code in MyBaseBO, I would have thought I needed to map it to the DDT to have access to the field names, etc.
|
|
|
Aaron Young
|
|
Group: StrataFrame Users
Posts: 277,
Visits: 1.1K
|
By the way, the current one parent per BO limitation is the only thing I could complain about SF and it looks like you are removing this issue. Even then it wasn't a big complaint! I have only been with SF for a couple of weeks and have made BIG progress in converting my app from a rival system. Just wanted to post this as I don't want there to be any confusion as I know they are reading this!
|
|
|
Aaron Young
|
|
Group: StrataFrame Users
Posts: 277,
Visits: 1.1K
|
[I know, you have mentioned that several times and I had tried to addres this on some other threads and apparently I didn't get my point across. The ParentRelationship property is treated differently than all other properties. It is intentionally hidden outside of the component designer, so there is something in the mix that is making this property and the environment that you have setup think that the object you are dealing with is an instance versus a designer window. Ah I see what you were saying now - sorry Okay, thanks for the sample project (which works). I checked and I didn't see any differences between your code and mine. So I added two new BOs and subclassed one from the other. I could see the ParentRelationship from both BOs. The only difference between these new BOs and my original ones is that the latter were both mapped to the same table in the DDT whereas the new BOs were not mapped to anything. In your sample project you have MyBaseBO and MyInheritedBO. Which one would you map to the table in the DDT? Would you map only one or both? I think it is breaking in the BO Mapping.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
However, it is worth noting that I can see other SF BO properties when I open the DeliveryDistanceEnquiry in the component designer. I know, you have mentioned that several times and I had tried to addres this on some other threads and apparently I didn't get my point across. The ParentRelationship property is treated differently than all other properties. It is intentionally hidden outside of the component designer, so there is something in the mix that is making this property and the environment that you have setup think that the object you are dealing with is an instance versus a designer window. I created a sample in C# and it worked as it should. You might be able to see where your problem is by looking at this code.
|
|
|
Aaron Young
|
|
Group: StrataFrame Users
Posts: 277,
Visits: 1.1K
|
With the following exceptions, I haven't added any extra code to the BOs beyond what is created as a default. In the following example, both BOs have been mapped to the same underlying table using the BO Mapper. I then changed the definition of the second DeliveryDistanceEnquiry class to inherit from the original DeliveryDistance class which is inherited from BusinessLayer. public partial class DeliveryDistance : MicroFour.StrataFrame.Business.BusinessLayer public partial class DeliveryDistanceEnquiry : DeliveryDistanceI can see ParentRelationship when I open DeliveryDistance in the component designer but I don't see it when opening DeliveryDistanceEnquiry. However, it is worth noting that I can see other SF BO properties when I open the DeliveryDistanceEnquiry in the component designer. ParentRelationship appears to have been selectively hidden in the designer.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Do you have a timescale on this? We have a lot of balls in the air and there are really a lot of new features already being implemented in the 1.6.6 (a lot more than is currently posted on the forum). It is my desire to wrap up the 1.6.6 beta by the end of June (which would hopefully include this new feature)...but it may not make it into the 1.6.6 build depending on time constraints and testing. Why? is there a design limitation for this? This is a lengthy topic...but basicially it isn't necessary. We have been doing this within our medical app for around a year now so it is tried and testing. The parent relationship is generally always necessary, however, the foreign key fields may not be. By placing it in this collection it would always force the foreign key field BO to be present...even when it isn't necessary. We can talk about this more in class...but there are a lot of reasons and this is the road we initially went down and by pulling it out and putting it into a shared class, we use it for all types of scenarios. You can even have multiple BOs talking to the same relationship source, etc. which you could not do in a designer type environment. So it is basically to remove limitations, not create them.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
I just created a sample and it worked. So I guess that question would be more at the root level (your class and subclassed BO). In fact, we do this ourselves all of the time, so if you have a BO that inherits from BusinessLayer (this would be your base) and then your BO inherits from your base, you should see it. There is logic to prevent this property from appearing within designer dialogs (i.e. dropped on a form, etc.) so it sounds like something is going on in regards to inheritance. You might send me a sample of your code so I can see what is going on.
|
|
|
Aaron Young
|
|
Group: StrataFrame Users
Posts: 277,
Visits: 1.1K
|
I am actually using the Component Designer (i.e. double-click on the inherited BO in the solution explorer) and the ParentRelationship is missing from the Properties window as below. Glad to hear you will be offering multiple relationships in 1.6.6 or 1.6.7. Do you have a timescale on this? If it is going to be soon then I will try and wait but I do really have an immediate need for it. If not, then I will subclass the BO provided I can get passed this problem. Thanks.
|
|
|