Jon Brisbin
635e156bc0
JIRA: DATADOC-70: Trying to fix problem with indexes being wiped out in the tests, trying to make sure indexes get created properly. Now tests do not wipe out database automatically.
2011-03-25 13:53:16 -05:00
Thomas Risberg
0468ba3ad9
DATADOC-48 adding checks not to overwrite existing keys in changeset
2011-03-25 11:15:08 -04:00
Oliver Gierke
95510e4851
Use more readable logging output pattern.
2011-03-25 13:08:28 +01:00
Oliver Gierke
0fc3c9d6d3
Polished toString() method of Index.
2011-03-25 13:07:49 +01:00
Oliver Gierke
511128f4e7
Let Querydsl annotation processor work with @Document annotation.
2011-03-25 08:26:42 +01:00
Oliver Gierke
986203833a
Fixed potential NullPointer.
2011-03-24 15:50:33 +01:00
Jon Brisbin
7ec8b30fb2
Tweaked README to reflect recent changes in timestamp handling.
2011-03-23 11:55:50 -05:00
Jon Brisbin
c24327d1bc
Took out leftover crap from pom file, changed timestamp handling to use java.util.Date/ISODate objects rather than string/long.
2011-03-23 11:54:53 -05:00
Jon Brisbin
b04023f1f1
Forgot to change Maven artifactId after renaming submodule.
2011-03-23 11:11:20 -05:00
Jon Brisbin
42386d4fee
Added Log4J appender submodule to main project.
2011-03-23 10:40:47 -05:00
J. Brisbin
1b5ef78741
Merge branch 'log4j-appender'
2011-03-23 10:40:47 -05:00
Thomas Risberg
168e8a8896
DATADOC-48 simplified cross-store persistence of @Document annotated fields in a JPA entity; adjusted to package chamges in data-commons; Merge commit 'f21f25fb5284a8647dea16934d660b3608d5006c'
2011-03-23 11:24:52 -04:00
Thomas Risberg
f21f25fb52
DATADOC-48 simplified cross-store persistence of @Document annotated fields in a JPA entity
2011-03-23 07:44:52 -04:00
Oliver Gierke
261c1ae293
Fixed merge conflicts after applying latest changes from master.
2011-03-23 09:27:50 +01:00
Oliver Gierke
7d7cf60e23
DATADOC-69 - Repository namespace now allows referenceing a MappingContext and picks up the default one if available.
2011-03-23 09:21:54 +01:00
Oliver Gierke
bfd79377ca
Made MongoPersistentEntityIndexCreator an ApplicationListener again.
...
MongoPersistentEntityIndexCreator now listens to MappingContextEvents to ensure indexes for added entities *after* the initial set had been added.
2011-03-23 09:21:15 +01:00
Oliver Gierke
18b0f45985
Adapt latest changes in Spring Data Commons.
...
Moved functionality from MongoMappingConfigurationBuilder into MongoMappingContext. Adapted namespace parser to the removal of the MappingConfigurationBuilder component.
2011-03-23 09:19:34 +01:00
Oliver Gierke
1183789bb3
DATADOC-69 - Repository namespace now allows referenceing a MappingContext and picks up the default one if available.
2011-03-23 09:16:10 +01:00
Oliver Gierke
4dd1d0198f
Removed some compiler warnings.
2011-03-23 09:14:30 +01:00
Oliver Gierke
ec7d2deca1
Made MongoPersistentEntityIndexCreator an ApplicationListener again.
...
MongoPersistentEntityIndexCreator now listens to MappingContextEvents to ensure indexes for added entities *after* the initial set had been added.
2011-03-23 07:45:25 +01:00
Oliver Gierke
27b6f0cb21
Adapt latest changes in Spring Data Commons.
...
Moved functionality from MongoMappingConfigurationBuilder into MongoMappingContext. Adapted namespace parser to the removal of the MappingConfigurationBuilder component.
2011-03-23 07:41:04 +01:00
J. Brisbin
efa6d0d8b8
Added applicationId and write concern settings. Documented them in the README.
2011-03-22 18:48:40 -05:00
Jon Brisbin
39a323099f
Added README to document the Log4J appender.
2011-03-22 15:24:14 -05:00
Jon Brisbin
b22412fa98
Fixed a bug introduced in the last commit with importing a morphia exception class, added a Log4J appender module for MongoDB.
2011-03-22 15:14:43 -05:00
Oliver Gierke
67b5a1c99b
Tweaks to index creation handling.
...
Renamed MappingConfigurationHelper to MongoPersistentEntityIndexCreator as this is the purpose of the class. Refactored it not be ApplicationContextAware, Initializing bean but rather simply use the injected MongoMappingContext and MongoTemplate to trigger index creation. Added base-package parsing for entities annotated with @Persistent and @Document to be added to the MappingContext. Moved createPersistentEntity and createPersistentProperty methods into MongoMappingContext.
2011-03-22 21:07:19 +01:00
Jon Brisbin
027a67dd1b
Reorganized how index creation and initial entity registration are handled. It now happens when the context is refreshed and any time entities are registered with addPersistentEntity via synchronous ApplicationEvent dispatching.
2011-03-22 13:54:26 -05:00
Jon Brisbin
84aba45895
Put addPersistentEntity calls into a dedicated ApplicationEvent listener bean that gets populated by the classpath scanning done in the namespace parser.
2011-03-22 11:16:35 -05:00
Jon Brisbin
537e2e71c4
Fix for bug in handling arrays, deleted extraneous test class.
2011-03-21 12:02:05 -05:00
Jon Brisbin
a1ef9abef2
Fixes for handling Arrays, had to change index creation from event-based to synchronous for simplicity's sake.
2011-03-21 11:41:32 -05:00
Oliver Gierke
d01867b072
Fixed broken test.
...
Removed wiring a MongoTemplate as constructor argument for MongoMappingConfigurationBuilder.
2011-03-21 16:49:22 +01:00
Jon Brisbin
07188d2a27
Fixed namespace handler support, added a MappingContextEvent listener for (asynchronously) creating indexes whenever entities are registered with the mapper. Removed that part of the code from the MongoMappingConfigurationBuilder, which means it no longer has that dependency on MongoTemplate. Also tweaked some afterPropertiesSet methods to try and reduce the problem of chicken-and-egg dependencies within mapping components.
2011-03-18 09:56:18 -05:00
Oliver Gierke
5df34cec70
@SuppressedWarning cleanups.
2011-03-18 07:59:49 +01:00
Oliver Gierke
bea1ed9cbe
Ignore MappingTests in the meantime to get the build working.
2011-03-18 07:59:36 +01:00
Oliver Gierke
f41e60a264
Prefer considering the value type over the property type at the decision whether to recursively map an object or simply write it as plain value.
...
Removed obsolete code (probably introduced by invalidly resolving a merge conflict).
2011-03-17 23:04:28 +01:00
Oliver Gierke
d69b890a70
DATADOC-40 - Repositories now pick up collection name from mapping metadata if available.
...
We also pick up the ID attribute to be used to determine isNew(…) if the RepositoryFactoryBean gets a MappingContext injected. Collection name of mapping defaults to the simple class name.
2011-03-17 23:02:51 +01:00
Jon Brisbin
d215004f92
Added a namespacehandler and broke all the tests. :)
2011-03-17 15:23:45 -05:00
Mark Pollack
c4fdc54ffe
Merge remote branch 'origin/master'
2011-03-17 15:36:39 -04:00
Mark Pollack
cb2cd48ca1
Ignore Thumbs.db
2011-03-17 15:36:30 -04:00
Jon Brisbin
f0c4f3e75f
Drop back to using LinkedBlockingQueue because the Deque version is Java 6.0
2011-03-17 13:09:03 -05:00
Jon Brisbin
6540c23413
Added event handling capabilities based on Spring 2.0 ApplicationEvent abstractions. Publishes events into the current ApplicationContext to expose internal mapping events to listeners declared in the current ApplicationContext.
2011-03-17 11:57:07 -05:00
Oliver Gierke
49e3f2b8c7
Improved handling of custom converters.
...
On COnverter registration we now keep track of the types the converter can register and only apply custom conversion if we had discovered a custom converter initially.
2011-03-17 14:34:36 +01:00
Oliver Gierke
30e4c4330b
Tweaks after merging Jon's latest changes.
2011-03-17 10:31:08 +01:00
Oliver Gierke
c4701d18f6
Tweaked unit test to use mock ApplicationContext.
2011-03-17 10:12:50 +01:00
Oliver Gierke
4629ebdcfe
Tweaked MappingMongoConverter to prefer custom Converters.
...
Before recursively converting values itself, MappingMongoConverter now checks whether the underlying ConversionService can convert the value to be converted into a Mongo basic type itself.
2011-03-17 10:12:49 +01:00
Oliver Gierke
611793d5c7
Improved handling of custom converters in SimpleMongoConverter.
...
Explicitly remove converter for Object -> String on instance creation which allows us to get rid of the ugly SimpleToStringSuppressingGenericConversionService. writeCompoundValue(…) now asks the ConversionService whether it can convert the value to be written into one of Mongos native primitive types and rather delegates to the service instead of recursively writing the value itself.
2011-03-17 10:10:57 +01:00
Jon Brisbin
74df4349ed
Use DBRefs instead of DBObjects so that save() will work. Now requires that a Mongo instance be set on the MappingMongoConverter, which is done from afterPropertiesSet() on the template.
2011-03-16 08:48:25 -05:00
Oliver Gierke
b6c3760e78
Fixed ConversionService handling in SimpleMongoConverter.
...
Removed possibility to use custom ConversionService and rather provide a setter to allow registering custom Converter and ConverterFactory instances. This way we can use a custom ConversionService our own that does not regard the ObjectToStringConverter registered by default. This way ConversionService.canConvert(…, String.class) will not return true by default.
2011-03-16 11:56:39 +01:00
Oliver Gierke
f747f3df60
Only consider properties that are backed by a field actually.
...
Changed MongoPropertyDescriptor.isMappable(…) to check whether the owning type actually has a field with the property name. If not the property will not be regarded as mappable. This results in plain functional getters (that are not a bean property getter actually) to be skipped transparently.
2011-03-16 11:56:39 +01:00
Thomas Risberg
4b7d96347c
ignore the eclipse project files
2011-03-15 23:36:20 -04:00
Thomas Risberg
d223a9817a
added test scope
2011-03-15 23:36:20 -04:00