Wednesday, 15 February 2012

Jongo create Ref and no embedded object -



Jongo create Ref and no embedded object -

what best way set dbref in entity? not save relation embedded object in collection example.

public class order { @id @generatedvalue public string id; private list<article> articles; } public class article { @id @generatedvalue public string id; private string name; }

jongo save relations embedded document.

if realy want's dbref instead, you'll have deal yourself.

public class order { @id @generatedvalue public string id; // _id of articles private list<string> articles; }

when you'll save order, you'll have save articles, update order.

jongo

No comments:

Post a Comment