-
Dec 7th, 2012, 10:59 AM
#1
How to embed documents in mongodb/Roo
Hi,
I'm using Spring roo with mongodb. My data model contains some documents which embed other documents.
Example:
Customer:{
"name",
"addresses":{
"street",
"city",
"country"
}
}
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?
Thanks!
Bonty
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules