Hi,
I heared that it is not recommended to use both Jmix- and JpaRepository within one project, as these are in conflict. There is no problem, I would stick to one if they would have been equivalent. But in fact, JmixRepository seems to not provide an alternative to JpaSpecification. Or does it?
Hello!
Actually, you can use both of them, just make sure that they are separated into different packages ( see “II” in this reply to get an example project and instruction how to configure repositories).
Please, also, do not forget that Jmix Data Repositories support all Jmix mechanisms (entity events, cross-datastore references, data access checks, audit, dynamic attributes, lazy loading, etc), while Spring Data Repositories don’t even know about them and you will not be able to use this Jmix features for entity instances loaded through JpaRepository.
Currently, we do not have any alternative to JpaSpecification, but we will think about adding such functionality during work on this task.
Regards,
Dmitry
1 Like