I have a maven project which contains some entities which are stored in a database. The purpose of this project is to manage personal information, users, locations, etc. This project can work on its own.
I also have a project which depends on the first which imports data into the database. But it's more than a simple import so it needs additional information to these entities. This information is only needed if it's imported data otherwise it is not set.
The problem
The problem is that I don't know how to "attach" this information to the entities in the first project without declaring them there. It wouldn't make sense to declare them there because the y don't belong there and it would just mix two domains. Putting both projects into one is not an option either because both are already big and still growing.
Approach to the problem
One approach I was thinking of is to use another entity which contains all information needed in the importer project and associate it with the original entity. This would almost work but it would create a terrible database model which I would never create if I wouldn't use an ORM.
I'm starting to think if I even should use a ORM because of the ORM I use (Hibernate) I also had to make several changes of the design to the worse just because the ORM doesn't support it (using the Null Object Pattern or Interface segregation principle, for example).