Replies: 1 comment
-
I guess what I'd like here is for the the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would it be possible somehow to allow associations to entities which are not in the current classpath?
Suppose I have two Spring Modulith modules,
Foo
andBar
, each modelling their own aggregate. And suppose I want to allowBar
entities to refer toFoo
entities by id. But, I wantBar
to be as loosely coupled toFoo
as possible, so I don't even wantBar
to be allowed to referenceFoo
. (At the persistence level, we can imagine that thefoo_id
column onBar
entities is just a plain column (e.g. UUID) without a foreign key constraint. The same use case would occur ifFoo
andBar
were separate microservices.)Since I don't want to be able to reference
Foo
fromBar
, I can't write e.g.:... because I can't (and don't want to) be able to reference
Foo
fromBar
.However, I'd still like somehow to record that
foo
is a reference to theFoo
aggregate, so that e.g. the automatic document generation would still work.Is this possible with the current jmolecules? Or if not, could this feature possibly be added?
Beta Was this translation helpful? Give feedback.
All reactions