Skip to content

Morphia query should also return Documents / json and not just mapped objects.  #3155

Description

@SOCRATESZZ

Example:
I have an Book entity. it has
class Book {
String id;
String author;
int price;
Date manufacturingDate;
.
.
.
}

when I am trying to query using Projections.include(id, author). It gives me entire Book object with id and author intitialized and other fields set to null.
(Actual Problem)

  1. this is acceptable when we know the entities we are dealing with. But if I had to make it dynamic we dont know which all fields did we fetched with.
  2. It increases the over head of handling objects and accessing data. Which can solved by returning Document / Json.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions