Resolving subdocument types with Spring Data and MongoDB
问题 I'm encountering an error with a Spring Data repository as it attempts to resolve a property expression: public interface ContractRepository extends MongoRepository<Contract,String> { public List<Contract> findByCodeBindings(String binding); } Here's the relevant parts of Contract : @Document(collection="CONTRACTS") public class PersistentContract extends BaseContract { @PersistenceConstructor public PersistentContract(String name, Version version, Code code) { super(name, version, code); } }