Morphia « mongodb « Java Database Q&A





1. Morphia and MongoDB - Modeling Something like Settings    stackoverflow.com

I'm evaluating MongoDB and Morphia right now. How would I model something like 'settings', where there is only one 'record' (I'm not sure of the proper Mongo term to use). ...

2. Morphia/MongoDB: can't do getmore    stackoverflow.com

I'm trying to iterate over all rows ("documents"?) in my MongoDB database using Morphia. Occasionally I get the following stacktrace:

com.mongodb.MongoInternalException: can't do getmore
    at com.mongodb.DBApiLayer$Result._advance(DBApiLayer.java:378)
    ...

3. Strategy for using Morphia to persist domain objects without adding unnecessary annotations to domain objects?    stackoverflow.com

Hypothetically, lets say I have a domain object called Person. It looks like such:

public class Member {

    private final String firstName;
    private final String lastName;
 ...

4. Using Mongodb and Morphia    stackoverflow.com

Hi has anyone have used Mongodb with Morphia. I have made a implementation however I am getting a lot of errors from my implementation following the link below; Can anyone share ...

5. Unit testing with MongoDB    stackoverflow.com

My database of choice is MongoDB. I'm writing a data-layer API to abstract implementation details from client applications - that is, I'm essentially providing a single public interface (an object which ...

6. Morphia Generics - Not Possible?    stackoverflow.com

I'm trying to save a List of Generics(M) through Mongo/Morphia. I get this error when I tried to save: com.google.code.morphia.mapping.MappingException: Generic Typed Class not supported: = class java.lang.Object Does this mean ...

7. How to add indexes in mongoDB project with Morphia framework    stackoverflow.com

i'm working on a gwt project, that uses mongoDB as database, and morphia framework to work with mongodb. I already finished the basic dao of my classes and now i want to ...

8. Is there a way to automate the generation of test data for MongoDB    stackoverflow.com

I have a DTO being mapped to MongoDB using morphia. Is there any way of generating randomised test data for MongoDB (as per my DTO) without writing something in-house?

9. How to programmatically instantiate dynamically loaded class from values in a file?    stackoverflow.com

I have basic knowledge of Java's reflection API - therefore, this is not only a question of how, it's a question of whether it's possible and whether I'm going about a ...





10. DAO and dependency injection, advice?    stackoverflow.com

This is the first time im using the DAO pattern. From what I've read so far, implementing this pattern will help me seperate my calling code (controller) from any ...

11. How to call DAO without Factory?    stackoverflow.com

As per my post here, I have the following DAO hierarchy: GenericDAO.java

public interface GenericDAO<T, K> {
    public K insert(T object);
    public void remove(K objectId);
  ...

12. morphia handle bad data    stackoverflow.com

Let's say I have some json like this in mongo:

{"n":"5"}
and a java class like this:
@Entity 
public class Example {
    Integer n;
}
This works (I know that the json should ...