spring-projects/spring-data-mongodb — pull request #187 by christophstrobl (2014-06-10 09:23:16+00:00)
Title: DATAMONGO-949 - CycleGuard should only match properties in word boundaries.

We modified the regular expression used for cycle detection to match on the **exact** property name within the inspected path using word boundaries. This fix prevents sub sequences of an existing property (like *sub* would have matched *substr*) from being matched.

Along the way we fixed the (false) assertion in one of the tests, as we create the +1 cycle reference index before actually breaking the operation.