private String createMapKey(MongoPersistentProperty property) { return ClassUtils.getShortName(property.getOwner().getType()) + ":" + property.getFieldName(); }
/** * Detect a cycle in a property path if the property was seen at least once. * * @param property The property to inspect * @param path The type path under which the property can be reached. * @throws CyclicPropertyReferenceException in case a potential cycle is detected. * @see Path#isCycle() */ void protect(MongoPersistentProperty property, Path path) throws CyclicPropertyReferenceException { String propertyTypeKey = createMapKey(property); if (!seenProperties.add(propertyTypeKey)) { if (path.isCycle()) { throw new CyclicPropertyReferenceException(property.getFieldName(), property.getOwner().getType(), path.toCyclePath()); } } }
private String createMapKey(MongoPersistentProperty property) { return ClassUtils.getShortName(property.getOwner().getType()) + ":" + property.getFieldName(); }
/** * Detect a cycle in a property path if the property was seen at least once. * * @param property The property to inspect * @param path The type path under which the property can be reached. * @throws CyclicPropertyReferenceException in case a potential cycle is detected. * @see Path#isCycle() */ void protect(MongoPersistentProperty property, Path path) throws CyclicPropertyReferenceException { String propertyTypeKey = createMapKey(property); if (!seenProperties.add(propertyTypeKey)) { if (path.isCycle()) { throw new CyclicPropertyReferenceException(property.getFieldName(), property.getOwner().getType(), path.toCyclePath()); } } }