|  | @@ -628,7 +628,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 628 | 628 |      ) { | 
                                                                                                            
                                                            | 629 | 629 |          if (!($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE | 
                                                                                                            
                                                            | 630 | 630 |              || $targetResourcePropertyKind == ResourcePropertyKind::RESOURCE_REFERENCE) | 
                                                                                                            
                                                            | 631 |  | -			&& !($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE | 
                                                                                                            
                                                            |  | 631 | +            && !($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE | 
                                                                                                            
                                                            | 632 | 632 |              || $targetResourcePropertyKind == ResourcePropertyKind::RESOURCE_REFERENCE) | 
                                                                                                            
                                                            | 633 | 633 |          ) { | 
                                                                                                            
                                                            | 634 | 634 |              throw new InvalidOperationException( | 
                                                                                                                                                        
                                                        |  | @@ -642,24 +642,24 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 642 | 642 |          $this->checkInstanceProperty($targetPropertyName, $targetResourceType); | 
                                                                                                            
                                                            | 643 | 643 |          // check that property and resource name don't up and collide - would violate OData spec | 
                                                                                                            
                                                            | 644 | 644 |          if (strtolower($sourcePropertyName) == strtolower($sourceResourceType->getName())  | 
                                                                                                            
                                                            | 645 |  | -			|| strtolower($targetResourceType) == strtolower($targetResourceType->getName())  | 
                                                                                                            
                                                            | 646 |  | -			) { | 
                                                                                                            
                                                            |  | 645 | +            || strtolower($targetResourceType) == strtolower($targetResourceType->getName())  | 
                                                                                                            
                                                            |  | 646 | +            ) { | 
                                                                                                            
                                                            | 647 | 647 |              throw new InvalidOperationException( | 
                                                                                                            
                                                            | 648 | 648 |                  'Property name must be different from resource name.' | 
                                                                                                            
                                                            | 649 | 649 |              ); | 
                                                                                                            
                                                            | 650 | 650 |          } | 
                                                                                                            
                                                            | 651 | 651 |   | 
                                                                                                            
                                                            | 652 |  | -		$sourceResourceProperty = new ResourceProperty($sourcePropertyName, null, $sourceResourcePropertyKind, $sourceResourceType); | 
                                                                                                            
                                                            |  | 652 | +        $sourceResourceProperty = new ResourceProperty($sourcePropertyName, null, $sourceResourcePropertyKind, $sourceResourceType); | 
                                                                                                            
                                                            | 653 | 653 |          $targetResourceProperty = new ResourceProperty($targetPropertyName, null, $targetResourcePropertyKind, $targetResourceType); | 
                                                                                                            
                                                            | 654 | 654 |   | 
                                                                                                            
                                                            | 655 | 655 |          $sourceResourceType->addProperty($sourceResourceProperty); | 
                                                                                                            
                                                            | 656 |  | -		$targetResourceType->addProperty($targetResourceProperty); | 
                                                                                                            
                                                            |  | 656 | +        $targetResourceType->addProperty($targetResourceProperty); | 
                                                                                                            
                                                            | 657 | 657 |   | 
                                                                                                            
                                                            | 658 | 658 |   | 
                                                                                                            
                                                            | 659 | 659 |          //Customer_Orders_Orders, Order_Customer_Customers | 
                                                                                                            
                                                            | 660 | 660 |          //(source type::name _ source property::name _ target set::name) | 
                                                                                                            
                                                            | 661 | 661 |          $setKey = ResourceAssociationSet::BidirectionalKeyName($sourceResourceType, $targetResourceType, $sourcePropertyName, $targetPropertyName); | 
                                                                                                            
                                                            | 662 |  | -       $set = new ResourceAssociationSet( | 
                                                                                                            
                                                            |  | 662 | +        $set = new ResourceAssociationSet( | 
                                                                                                            
                                                            | 663 | 663 |              $setKey, | 
                                                                                                            
                                                            | 664 | 664 |              new ResourceAssociationSetEnd($sourceResourceSet, $sourceResourceType, $sourceResourceProperty), | 
                                                                                                            
                                                            | 665 | 665 |              new ResourceAssociationSetEnd($targetResourceSet, $targetResourceType, $targetResourceProperty) |