Skip to content

Conversation

@christophstrobl
Copy link
Member

Index creation did not consider the properties path when creating the index. This lead to broken index creation when nesting entities that might require index structures.

Off now index creation traverses the entities property path for all top level entities (namely those holding the @Document annotation) and creates the index using the full property path.

This is a breaking change as having an entity to carry the @Document annotation has not been required by now.


We ensure that @CompoundIndex is properly looked up on both interfaces and super classes.


We introduced useGeneratedName (defaulted to false) on @Indexed, @CompoundIndex and @GeoSpatialIndexed to allow mongodb auto creating the index name.

christophstrobl added a commit that referenced this pull request Apr 14, 2014
… entities. Index creation did not consider the properties path when creating the index. This lead to broken index creation when nesting entities that might require index structures. Off now index creation traverses the entities property path for all top level entities (namely those holding the @document annotation) and creates the index using the full property path. This is a breaking change as having an entity to carry the @document annotation has not been required by now. Original Pull Request: #168
christophstrobl added a commit that referenced this pull request Apr 15, 2014
… entities. Index creation did not consider the properties path when creating the index. This lead to broken index creation when nesting entities that might require index structures. Off now index creation traverses the entities property path for all top level entities (namely those holding the @document annotation) and creates the index using the full property path. This is a breaking change as having an entity to carry the @document annotation has not been required by now. Original Pull Request: #168
@odrotbohm
Copy link
Member

Looks decent to me. Would you mind giving the MongoPersistentEntityIndexResolver an additional round of JavaDoc polish? I'll take it from there then, thanks!

christophstrobl added a commit that referenced this pull request Apr 23, 2014
… entities. Index creation did not consider the properties path when creating the index. This lead to broken index creation when nesting entities that might require index structures. Off now index creation traverses the entities property path for all top level entities (namely those holding the @document annotation) and creates the index using the full property path. This is a breaking change as having an entity to carry the @document annotation has not been required by now. Original Pull Request: #168
… entities. Index creation did not consider the properties path when creating the index. This lead to broken index creation when nesting entities that might require index structures. Off now index creation traverses the entities property path for all top level entities (namely those holding the @document annotation) and creates the index using the full property path. This is a breaking change as having an entity to carry the @document annotation has not been required by now. Original Pull Request: #168
…orrectly. With the overhaul of the index creation done in DATAMONGO-899 the CompoundIndex annotation is not longer just looked up at the concrete type but rather all its interfaces and super classes. So we just added an additional test to verify this behaviour.
We now support letting MongoDB generate index names by introducing the attribute "useGeneratedName" to the @indexed, @GeoSpatialIndex, @CompoundIndex annotations.
@christophstrobl christophstrobl changed the title DATAMONGO-899 - Overhaul index creation. DATAMONGO-899, DATAMONGO-909, DATAMONGO-827 - Overhaul index creation. Apr 28, 2014
christophstrobl added a commit that referenced this pull request Apr 28, 2014
… entities. Index creation did not consider the properties path when creating the index. This lead to broken index creation when nesting entities that might require index structures. Off now index creation traverses the entities property path for all top level entities (namely those holding the @document annotation) and creates the index using the full property path. This is a breaking change as having an entity to carry the @document annotation has not been required by now. Original Pull Request: #168
odrotbohm added a commit that referenced this pull request Apr 28, 2014
Removed the introduction of the IndexDefinition being collection aware again. The collection an index is created in is now held in the IndexDefinitionHolder. This is mostly due to the fact that the IndexDefinition implementations can be used with MongoTemplate and the index opoerations take a collection alongside the index definition. Made the IndexResolver API package protected so that we can further change it going forward. We should think about deprecating the collectionName attributes on index annotations as it doesn't make too much sense to manually configure the collection name for the indexes as the collection is predefined through the domain type setting here. This would allow us to remove the entire collection handling code inside the IndexResolver implementation. Turned IndexDefinitionHolder into a value object. Original pull request: #168.
@odrotbohm odrotbohm closed this Apr 28, 2014
@odrotbohm odrotbohm deleted the issue/DATAMONGO-899 branch April 28, 2014 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants