Dec 7th, 2012, 10:59 AM
How to embed documents in mongodb/Roo
I'm using Spring roo with mongodb. My data model contains some documents which embed other documents.
I've tried to do it this way : Create java bean class "Address" (without the entity tag), then create mongo Entity "Customer" where I created the attributes "name" and a Set of the class "Address".
- Using the Roo shell, when I try to execute this command :
field set --fieldName addresses --type ~.domain.Address
I get this warning/error:
The field set command is only applicable to enum, JPA @Entity or Spring Data @Persistence elements
Isn't it the right way to do it?
Tags for this Thread