Skip to content

Constructor creation using @DocumentReference SpEL referring to self in fails #4484

Closed
@joeshadbolt

Description

@joeshadbolt

Hi!

I am trying to use the @DocumentReference annotation as per guidance on modelling a One-To-Many relationship in the reference documentation:
https://docs.spring.io/spring-data/mongodb/docs/3.3.6/reference/html/#mapping-usage.document-references

However we are experiencing the following exception:
org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field '_id' cannot be found on null

Sample repository re-creating the issue:
https://github.com/joeshadbolt/spring-data-mongodb

Many thanks!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions