@Override public boolean isCollection() { return navigationProperty.isCollection(); }
@Override public boolean isCollection() { return navigationProperty.isCollection(); }
@Override public boolean isCollection() { return super.isCollection(); }
.findNavigationPropertyFromPath(fullNavBindPath, csdlentityType, edmxMetadataProvider); if (navProperty != null) { navigation.setCollection(navProperty.isCollection());
CsdlNavigationPropertyBinding binding, Table toTable) throws TranslatorException, AssertionError { if (!property.isCollection() || binding == null) { return false; if (toProperty.isCollection() || toProperty.isContainsTarget()) { continue;
comxNavProp.setPath(navProps.get(i).getName()); comxNavProp.setTypeClassName(navProps.get(i).getTypeFQN().getName()); comxNavProp.setCollection(navProps.get(i).isCollection()); comxNavs.add(comxNavProp); String navPropNamespace = EdmxToCommonModelHelper.resolveAliasToNamespace(edmxMetadataProvider,
private Table addNavigationAsTable(MetadataFactory mf, XMLMetadata metadata, Table fromTable, CsdlNavigationProperty property) throws TranslatorException { String name = join(fromTable.getName(), NAME_SEPARATOR, property.getName()); Table toTable = addTable(mf, name, property.getType(), property.isCollection()?ODataType.NAVIGATION_COLLECTION:ODataType.NAVIGATION, metadata); toTable.setNameInSource(property.getName()); KeyRecord pk = fromTable.getPrimaryKey(); List<String> columnNames = new ArrayList<String>(); for (Column c : pk.getColumns()) { String columnName = join(fromTable.getName(), NAME_SEPARATOR, c.getName()); Column column = mf.addColumn(columnName, c.getRuntimeType(), toTable); column.setProperty(PSEUDO, String.valueOf(Boolean.TRUE)); columnNames.add(columnName); } mf.addForeignKey("FK0", columnNames, getColumnNames(pk.getColumns()), fromTable.getFullName(), toTable); return toTable; }
navModel.setPath(nav.getName()); navModel.setTypeClassName(fqnNav.getName()); navModel.setCollection(nav.isCollection()); commonNavigations.add(navModel); if (!edmxNamespace.equals(fqnNavNamespace)) {
if (!isNavigationType(toTable) && !hasReverseNavigation(mf, metadata, container, fromTable, property, binding, toTable)) { if (property.isCollection()) { addImplicitFk(mf, fromTable, property, toTable, columnNames, referenceColumnNames); } else if (!property.isCollection()) { //sanity check - it should not be a collection for (CsdlReferentialConstraint constraint : property.getReferentialConstraints()) { columnNames.add(constraint.getProperty());