mongodb - How do you query for embedded objects from a repository with Spring Data? -


I have an object, let's call it a item . Speaking conceptually, users can take action against these items.

My document is root item , and it has embedded inside action .

P>

I have created a Spring Data repository:

  public interface item crude referitry and lt; Items, string & gt;   

Is it possible to make a method, perhaps by commenting it with any type of @Query , which is the Action that some criteria Matches? I want to get this data to show a user's recent history in Items 's.

Can act link in your document type and link them to your items 's?

It is possible to query action that you called with the following pattern The method can be used:
  findByAction_ {actionPropertyName}   

or if it is not ambiguous then you can remove the underscores.

1.3.2.2.1. Property expression from

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -