Home Dashboard Directory Help

update of sharepoint data source looses navigation property in relationship by EProbst


 as Won't Fix Help for as Won't Fix

Sign in
to vote
Type: Bug
ID: 727480
Opened: 3/1/2012 1:23:00 AM
Access Restriction: Public
User(s) can reproduce this bug


I have encountered a problem with a data source pointing to some Sharepoint lists:

List 1 = Band with Key Band.ID, List 2 = Bandprotocol with key Bandprotocol.ID and foreign Key BandID referring to Band.ID, one Band can have several protocols, the relationship is defined in Sharepoint. When the lists are included in Lightswitch, the relationship is there, too. But the navigation properties for the relationship are only partially defined, so I added them, that is:

Navigation property for Band is Bandprotocol , and navigation Property for Bandprotocol is Band in the Relationship properties. These are the only properties which can be edited in the relationship.

Works fine, and I can create screens etc. using this. E.g. adding the Bandprotocol to a Band-screen, and by this displaying the protocols belonging to a band.

BUT: when I update the datasource the navigation property for Band is lost, and everything in the Band-screen concerning the Bandprotcol data is deleted and has to be recreated

I think this has to do with the fact that the relationship from sharepoint is imported as a 0/1 to many relationship, although in fact it is a 1 to many relationship, BandId is set to required in the Sharepoint list. This is not recognized by Lightswitch, and it cannot be changed.

Sign in to post a comment.
Posted by EProbst on 3/12/2012 at 4:32 AM
Sorry, I do not understand. The link points to the documentation for adding relationships. no mention is made of navigation queries. I have still no idea what this might be.
As to relationships, please take into consideration the following:
1. I cannot add a relationship between the two entities myself, because of the well known error message "cannot add relatiosnhip because they are in the same container.
2. I do have a relationship between the two entities, because the relationship is defined in the sharepoint data source. I can add the missing navigation property. The Problem is that this is removed when updating the data source in Lightswitch, together with the screen objects which are defined for that navigation property.
Regards, Elke Probst
Posted by Microsoft on 3/9/2012 at 10:09 AM
Please see: http://msdn.microsoft.com/en-us/library/ff852044(v=vs.110).aspx
Posted by EProbst on 3/5/2012 at 11:26 PM
Thanks, can you please explain how to make a navigation query or point me to some documentation about this? I could not find anything about this.
Regards, Elke Probst
Posted by Microsoft on 3/5/2012 at 11:24 AM
Thanks for the feedback - this isn't handled well in S/P, in Dev11 the ability to add the missing nav property has been removed.

To enable this scenario you can create a navigation query to use instead.
Sign in to post a workaround.