Skip to content

DATAMONGO-279 - optimistic locking implementation #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 49 commits into from

Conversation

noter
Copy link
Contributor

@noter noter commented Sep 5, 2012

This is optimistic locking implementation based on version field.

sohai and others added 30 commits July 4, 2012 14:37
Using SerializationUtils.serializeToJsonSafely(…) instead of plain toString() as this might cause SerializationExceptions for complex objects.
The criteria object handed to the group object needs to be mapped correctly to map complex values. Improved error handling on the way.
Be better citizen regarding namespace support in STS. Moved ParsingUtils to Spring Data Commons.
…target type.

When reading BasicDBLists we now make sure the resulting collection is converted into the actual target type eventually. It might be an array and thus need an additional round of massaging before being returned as value.
So far the algorithm to inspect whether an id property has to be set after a save(…) operation has used the plain BeanWrapper.getProperty(PersistentProperty property) method. This caused problems in case the getter of the id field returned something completely different (to be precise: a complex type not convertible out of the box).

We now inspect the id field only to retrieve the value.
Updated changelog and links to reference documentation.
$ne expressions are now only being tried to be converted into an ObjectId in case they follow an id property. Previously they tried in every case which might have led to Strings being converted into ObjectIds that accidentally were valid ObjectIds but didn't represent an id at all.
Using SerializationUtils to safely output the query to be executed.
…$(n)or criterias.

Introduced helper class to ease assertions on DBObjects as well.
Reading an empty collection always returned a HashSet assuming the returned value would be converted into the assigned properties value later on. However the method should rather return the correct type already which we do now by invoking the potential conversion.
…package.

AbstractMappingConfiguration now uses the package of the class extending it to enable entity scanning for that package. To disable entity scanning entirely override the method to return null or an empty String.
…ntext.

Index creation now double checks the MappingContext a MappingContextEvent originates from before actually creating indexes. This avoids invalid indexes being created in a multi-database scenario.
We're now translating a negating property reference into a ne(…) call instead of a not().is(…).
…nd collection values.

Instead of converting given association values as-is, ConvertingParameterAccessor now converts each collection value into a DBRef individually.
odrotbohm and others added 19 commits September 3, 2012 16:59
…necessary data.

We're explicitly ruling out the entities attributes via a field spec to avoid unnecessary object marshaling just to find out whether it exists or not.
Complete overhaul of the QueryMapper to better handle complex scenarios like property paths and association references.
…ersion.

We move away from Maven version ranges as they complicate the build and dependency resolution process. They make the build in-reproducible. Users stuck with a 3.0.x version of Spring will now have to manually declare Spring dependencies in their needed 3.0.x version. Not that at least Spring 3.0.7 is required currently.
Introduced intermediate getMappedKeyword(Keyword keyword, MongoPersistentProperty property) to correctly return a DBObject for keyword plus converted value. A few refactorings and improvements in the implementation of QueryMapper (Keyword value object etc.).
Update README to remove references to old API, Docs links as well as CouchDB. Remove reference to Spring Data Document, copy initial paragraph introducing the project from http://www.springsource.org/spring-data/mongodb
@odrotbohm
Copy link
Member

I guess this one was created by accident, wasn't it?

@noter
Copy link
Contributor Author

noter commented Sep 5, 2012

Not exactly. We would like to contribute this, but i'm not completely familiar with github, sorry :-)

@noter noter closed this Sep 6, 2012
gregturn pushed a commit that referenced this pull request Oct 30, 2014
Fix directory name for sample pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants