seinecle
seinecle

Reputation: 10778

what is the equivalent of a MongoDB collection in Morphia?

... and if there is no equivalent, how should I go about to organize my data in a Morphia datastore?

Upvotes: 0

Views: 1008

Answers (2)

cubbuk
cubbuk

Reputation: 7920

You can change the name of the collection using AdvancedDatastore interface. For example:

advancedDatastore.save("collectionNameYouPrefer", yourMorphiaObject);

Above code will save yourMorphiaObject into the collection named "collectionNameYouPrefer".

Upvotes: 2

xeraa
xeraa

Reputation: 10859

You have your @Entity classes, which define your collections, and the instances are your documents.

Or am I misunderstanding your question?

Upvotes: 1

Related Questions