Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about morphia

Read more about morphia

python (65.2k questions)

javascript (44.3k questions)

reactjs (22.7k questions)

java (20.8k questions)

c# (17.4k questions)

html (16.3k questions)

r (13.7k questions)

android (13k questions)

Questions - morphia

Morphia throws error when the field was changed its type from String to enum: No enum constant

In DAO class I use with Morphia I have replaced the String filed type to enums.Currency and I expect that everything will work fine, when the data is retrieved from the db: was public String curre...
test-img

Eljah

java

mongodb

enums

mongodb-java

morphia

Votes: 0

Answers: 1

Latest Answer

This error is raised when there are String values in the Mongodb not existing in the enum. Here I have realized there are db entries with empty string fields: After replacing the empty string values ...
test-img

Eljah

Is there a way to get a collection in a random order?

Is it possible to get the full collection of documents in a random order? Or just a random sample?
test-img

Frederic Dhalleine

morphia

Votes: 0

Answers: 1

Latest Answer

You can use the aggregation framework's $sample. The Morphia API to access that is here.
test-img

evanchooly

MongoDB Morphia distinct

public Collection<OwnerDetail> getAllOwners() { final MorphiaCursor<Listing> listings = datastore.find(Listing.class) .iterator(new FindOptions() .proje...
test-img

Ishani Samaraweera

java

mongodb

morphia

Votes: 0

Answers: 0

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved