Skip to content

Morphia Quering is not working as expected. version 2.4 #3131

Description

@SOCRATESZZ

I have an Entity

@Entity("Book")
class Book{
   @Reference(language_id)
   private Language language;
}

@Entity("Language")
class Language{
   @Id
   public String id;
   // getters and setter
}

I am trying to query Books using language Id only

query.filter(Filters.eq("language.id", "1232342342 ==> the ID")).disableValidation().iterator().toList();

it is giving an error

dev.morphia.query.ValidationException: Could not resolve path 'language.id' against 'Book'.  Unknown path element: 'language'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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