How to use entities which are unmanaged by Jmix

Hi,

my project would like to make use of another framework, which brings its own entities. They have no relation whatsoever to the Jmix entites and should use the same DataSource but different tables.

How can I set this up? Right now I get the error

java.lang.IllegalArgumentException: Object: other.framework.jpa.OtherEntity@72327399 is not a known Entity type.

Help appreciated :slight_smile:

Hi Theresa,

Perhaps you need to configure a different persistence unit, which will directly use EclipseLink JPA included in Jmix.

But devil is in the details, so it’s better to consider your concrete use case. If you provide a sample project, we’ll try to help you configuring it.

Regards,
Konstantin

I would like to add Axon Framework and use aggregate entities.

What I plan:
I have a Jmix entity called Sample, which should be fully managed by Jmix. I create another class (“aggregate entity”) with name SampleAggregate and everytime something changes in an Sample instance, a Axon event will be triggered, which is handled in SampleAggregate and tells Axon to store the event in the database as-is.

To achieve that Axon provides a few Spring JPA entities of its own, which causes Jmix to fail to start with the above mentioned is not a known Entity type.

Thanks for the explanation, the situation is more clear to me now.
However unfortunately I cannot afford investing time into learning Axon now, so could you please provide a simplest test project where your problem with Jmix is reproduced?