function(sRole, aAssociation, aAssociationSet, bFrom) {
					var sEntitySet = jQuery(aAssociationSet).find("End[Role='" + sRole + "']").attr("EntitySet");
					var sMultiplicity = jQuery(aAssociation).find("End[Role='" + sRole + "']").attr("Multiplicity");

					var aPropRef = [];
					var aConstraint = jQuery(aAssociation).find("ReferentialConstraint > [Role='" + sRole + "']");
					if (aConstraint && aConstraint.length > 0) {
						jQuery(aConstraint[0]).children("PropertyRef").each(function(iIndex, oPropRef) {
							aPropRef.push(jQuery(oPropRef).attr("Name"));
						});
					} else {
						var oPrinDeps = (bFrom) ? oPrincipals : oDependents;
						jQuery(oPrinDeps).each(function(iIndex, oPrinDep) {
							if (sRole === (jQuery(oPrinDep).attr("Role"))) {
								jQuery(oPrinDep).children("PropertyRef").each(function(iIndex, oPropRef) {
									aPropRef.push(jQuery(oPropRef).attr("Name"));
								});
								return false;
							}
						});
					}

					return {
						"role": sRole,
						"entitySet": sEntitySet,
						"propRef": aPropRef,
						"multiplicity": sMultiplicity
					};
				}
function(sRole, aAssociation, aAssociationSet, bFrom) {
					var sEntitySet = jQuery(aAssociationSet).find("End[Role='" + sRole + "']").attr("EntitySet");
					var sMultiplicity = jQuery(aAssociation).find("End[Role='" + sRole + "']").attr("Multiplicity");

					var aPropRef = [];
					var aConstraint = jQuery(aAssociation).find("ReferentialConstraint > [Role='" + sRole + "']");
					if (aConstraint && aConstraint.length > 0) {
						jQuery(aConstraint[0]).children("PropertyRef").each(function(iIndex, oPropRef) {
							aPropRef.push(jQuery(oPropRef).attr("Name"));
						});
					} else {
						var oPrinDeps = (bFrom) ? oPrincipals : oDependents;
						jQuery(oPrinDeps).each(function(iIndex, oPrinDep) {
							if (sRole === (jQuery(oPrinDep).attr("Role"))) {
								jQuery(oPrinDep).children("PropertyRef").each(function(iIndex, oPropRef) {
									aPropRef.push(jQuery(oPropRef).attr("Name"));
								});
								return false;
							}
						});
					}

					return {
						"role": sRole,
						"entitySet": sEntitySet,
						"propRef": aPropRef,
						"multiplicity": sMultiplicity
					};
				}
function ( sRole , aAssociation , aAssociationSet , bFrom ) { var sEntitySet = jQuery ( aAssociationSet ) . find ( "End[Role='" + sRole + "']" ) . attr ( "EntitySet" ) ; var sMultiplicity = jQuery ( aAssociation ) . find ( "End[Role='" + sRole + "']" ) . attr ( "Multiplicity" ) ; var aPropRef = [ ] ; var aConstraint = jQuery ( aAssociation ) . find ( "ReferentialConstraint > [Role='" + sRole + "']" ) ; if ( aConstraint && aConstraint . length > 0 ) { jQuery ( aConstraint [ 0 ] ) . children ( "PropertyRef" ) . each ( function ( iIndex , oPropRef ) { aPropRef . push ( jQuery ( oPropRef ) . attr ( "Name" ) ) ; } ) ; } else { var oPrinDeps = ( bFrom ) ? oPrincipals : oDependents ; jQuery ( oPrinDeps ) . each ( function ( iIndex , oPrinDep ) { if ( sRole === ( jQuery ( oPrinDep ) . attr ( "Role" ) ) ) { jQuery ( oPrinDep ) . children ( "PropertyRef" ) . each ( function ( iIndex , oPropRef ) { aPropRef . push ( jQuery ( oPropRef ) . attr ( "Name" ) ) ; } ) ; return false ; } } ) ; } return { "role" : sRole , "entitySet" : sEntitySet , "propRef" : aPropRef , "multiplicity" : sMultiplicity } ; }
helper function to find the entity set and property reference for the given role name
helper function to find the entity set and property reference for the given role name
Returns the propertyRef and multiplicity of the association