You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having 2 entities i.e. Task and Project where a Project contain a list of taskIds
For Project, I have a ProjectRepositoryDecorator extends ResourceRepositoryDecoratorBase<T, I>
For Task just the Entity and I configured the repository like: config.addRepository(JpaRepositoryConfig.builder(TaskEntity.class).build());
Then in the implementation of the create() method for Project I would like to check that the taskIds of a new Project are from task that contains certain property.
My point is how in the ProjectRepositoryDecorator.save() I can access the TaskRepository to do a findOne()?
I tried implementing a TaskRepository extends ReadOnlyResourceRepositoryBase, but when I call the findOne of this instance, the repository has the attribute resourceRegistry null.
The text was updated successfully, but these errors were encountered:
the resource registry is the way to go. make sure to implement that ResourceRegistryAware and setResourceregistry. maybe the method also needs to be invoked on the super type.
dependeny injection in this area is sonething that would be worthwhile to investigate, it is a frequent topic that comes up.
Having 2 entities i.e. Task and Project where a Project contain a list of taskIds
For Project, I have a
ProjectRepositoryDecorator extends ResourceRepositoryDecoratorBase<T, I>
For Task just the Entity and I configured the repository like:
config.addRepository(JpaRepositoryConfig.builder(TaskEntity.class).build());
Then in the implementation of the create() method for Project I would like to check that the taskIds of a new Project are from task that contains certain property.
My point is how in the ProjectRepositoryDecorator.save() I can access the TaskRepository to do a findOne()?
I tried implementing a TaskRepository extends ReadOnlyResourceRepositoryBase, but when I call the findOne of this instance, the repository has the attribute resourceRegistry null.
The text was updated successfully, but these errors were encountered: