DATADOC-48 improving the entity id handling for partial entity document persistence

This commit is contained in:
Thomas Risberg
2011-03-28 13:58:15 -04:00
parent 6d8ecf2cbb
commit 615f3f1323
5 changed files with 49 additions and 49 deletions

View File

@@ -64,11 +64,6 @@ public class CrossStoreMongoTests {
public void testReadJpaToMongoEntityRelationship() {
Person found = entityManager.find(Person.class, 1L);
Assert.assertNotNull(found);
// TODO: This part isn't quite working yet - need to intercept the id
// population from JPA EM
found.setId(found.getId());
Assert.assertEquals(Long.valueOf(1), found.getId());
Assert.assertNotNull(found);
Assert.assertEquals(Long.valueOf(1), found.getId());
@@ -84,11 +79,6 @@ public class CrossStoreMongoTests {
public void testUpdatedJpaToMongoEntityRelationship() {
Person found = entityManager.find(Person.class, 1L);
Assert.assertNotNull(found);
// TODO: This part isn't quite working yet - need to intercept the id
// population from JPA EM
found.setId(found.getId());
Assert.assertEquals(Long.valueOf(1), found.getId());
Assert.assertNotNull(found);
Assert.assertEquals(Long.valueOf(1), found.getId());

View File

@@ -36,6 +36,7 @@
<bean id="mongoChangeSetPersister"
class="org.springframework.data.persistence.document.mongo.MongoChangeSetPersister">
<property name="mongoTemplate" ref="mongoTemplate"/>
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<jdbc:embedded-database id="dataSource" type="HSQL">