forked from spring-attic/spring-data-aerospike
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Root cause: spring data scans base package of configuration for entities to be added to mapping context at template bean creation phase. Since template is needed for index creation, entity index creator fails to create annotation based indexes on circular dependency to template. Resolution summary: accumulate indexes which comes before context is being inited and create all in batch after context is up and all beans are created. Futher creations will be based on persistence entity applicaton event
- Loading branch information
1 parent
cba988d
commit a5e16b9
Showing
7 changed files
with
66 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/test/java/org/springframework/data/aerospike/config/ConfigPackageDocument.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.springframework.data.aerospike.config; | ||
|
||
import com.aerospike.client.query.IndexType; | ||
import lombok.Value; | ||
import org.springframework.data.aerospike.annotation.Indexed; | ||
import org.springframework.data.aerospike.mapping.Document; | ||
import org.springframework.data.annotation.Id; | ||
|
||
@Value | ||
@Document(collection = "config-package-document-set") | ||
public class ConfigPackageDocument { | ||
|
||
@Id | ||
String id; | ||
|
||
@Indexed(type = IndexType.STRING, name = "config-package-document-index") | ||
String indexedField; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters