spring-data-document

Spring Data Mongodb Cross store:: With MySQL @RelatedDocument(s) not updating

久未见 提交于 2019-12-05 06:52:29
问题 I am using Spring Data Mongodb and Spring data JPA module for MySQL. I have successfully configured as suggested in the reference document. I am able to save but not able to update the mongodb "RelatedDocuments" though I am successfully able to update the MYSQL fields. The entity relationship is like User(Mysql) has Addresses(Mongo) > Has list of Address (quite similar to the survey example in reference. My situation is exactly similar to http://forum.springsource.org/showthread.php?126897

Spring Data Mongodb Cross store:: With MySQL @RelatedDocument(s) not updating

回眸只為那壹抹淺笑 提交于 2019-12-03 20:40:40
I am using Spring Data Mongodb and Spring data JPA module for MySQL. I have successfully configured as suggested in the reference document. I am able to save but not able to update the mongodb "RelatedDocuments" though I am successfully able to update the MYSQL fields. The entity relationship is like User(Mysql) has Addresses(Mongo) > Has list of Address (quite similar to the survey example in reference. My situation is exactly similar to http://forum.springsource.org/showthread.php?126897-Using-Spring-Data-with-MongoDB-and-MySQL The versions I am using are as follows spring-data.mongodb

Mongo - Ignore property from being persisted

别等时光非礼了梦想. 提交于 2019-12-01 02:03:07
I have a standard POJO that has a set of properties in it. The POJO has been annotated as a @Document , so as to be persisted in MongoDB as a Document. How (annotation??) can I ignore/avoid one of the properties in the POJO from being persisted? The @Transient annotation it is. See http://static.springsource.org/spring-data/data-document/docs/current/reference/html/#mapping-usage-annotations In case you are looking for the actual package like I was, this one will work: import org.springframework.data.annotation.Transient; Which is from the Spring framework API documentation. But this one,

DBRefs (Mongo Document references) not fetched eagerly

前提是你 提交于 2019-11-30 22:21:55
I am using Mongo in its simplest avatar possible (in conjunction with Spring Data). I have two (first class) entities (@Documents) A and B, where A has a reference (@DBRef) of B within it. Everything works fine when creating A and B. However, when reading object A (by Id), the reference B is always null . I believe DBRefs are eagerly fetched by default (see http://static.springsource.org/spring-data/data-document/docs/current/reference/html/#mapping-usage-references ), but the behavior currently is against that. Any ideas why? You are correct, any DBRefs are eagerly fetched, but they are not

DBRefs (Mongo Document references) not fetched eagerly

别等时光非礼了梦想. 提交于 2019-11-30 17:56:25
问题 I am using Mongo in its simplest avatar possible (in conjunction with Spring Data). I have two (first class) entities (@Documents) A and B, where A has a reference (@DBRef) of B within it. Everything works fine when creating A and B. However, when reading object A (by Id), the reference B is always null . I believe DBRefs are eagerly fetched by default (see http://static.springsource.org/spring-data/data-document/docs/current/reference/html/#mapping-usage-references), but the behavior

Mongo - Ignore property from being persisted

↘锁芯ラ 提交于 2019-11-28 02:23:36
问题 I have a standard POJO that has a set of properties in it. The POJO has been annotated as a @Document , so as to be persisted in MongoDB as a Document. How (annotation??) can I ignore/avoid one of the properties in the POJO from being persisted? 回答1: The @Transient annotation it is. See http://static.springsource.org/spring-data/data-document/docs/current/reference/html/#mapping-usage-annotations 回答2: In case you are looking for the actual package like I was, this one will work: import org