mongodb - Embed Lists of custom objects in morphia -
i new morphia , wondering if possible embed lists of custom objects in doc while having custom name.
e.g.,
say have following
ap_thing
{'_id':0, 'name': blah, 'cells': [ {'row':1, 'col':a, 'val':'what did pirate when turned 80?', }, {'row':2, 'col':a, 'val': 'arggg, ay'matey!' } }
and want phone call outer class thing , inner class mycell (thus requiring entity specifications)
how set outer , inner class to: 1) embed list of these cell objects 2) allow attribute name different class name
in docs had illustration single embedded class used. in illustration suggested utilize annotation @embed("cells") in mycell class. can same lists?
for list, you'd utilize @property("cells")
e.g.
mongodb morphia
No comments:
Post a Comment