Closed andrus closed 6 years ago
This error still persists even I upgrade to v1.0. I have to remove data map definitions from cayenne project file to run my application successfully. If they stays in cayenne project file, it gives error.
Interesting point is that I can see your fix is in charge by putting debugpoint but still gets the same error message, weird.
Hi,
I've tried to check this issue again.
For me this fix is working.
I read your mail on bootique mail list and had an assumption: maybe for some reason you added cayenne-project in code (for example CayenneModule.extend(binder).addProject("cayenne-project.xml")
). If I did it this bug appeared.
Also it happened when I had duplicated entities in different datamaps but I think you've checked this.
Ok, I checked the code, found similar line like you mentioned 'CayenneModule.extend(binder)...' After removing that, it seems ok, thanks.
So I guess not an issue after all, but I wish the errors were a bit more transparent. I opened #67 to take another look and see if we can improve the diagnostics.
Given a project with default name
cayenne-project.xml
and the following YAML config, we get an error similar to the one below. It happens because Cayenne loads each DataMap twice - once via implicit default project, and the second time - based on the "maps" section.We should ignore the default project if maps are present explicitly (perhaps with a warning in the logs).
Error: