Thanks Andrus, I suspected this was the case. Fortunately the table names are 
different, so I’m not hitting the other bugs. But having each datamap live in 
it’s own namespace would be awesome.

Maybe Cayenne should warn the user when there are two ObjEntities with the same 
name? Even throw an exception and shut down?

One question: Can I use periods in the ObjEntity name? I.e. is there anything 
against me using the fully qualified class name as the entity name?

Cheers,
- hugi



> On 28. mar. 2016, at 17:11, Andrus Adamchik <[email protected]> wrote:
> 
> Yes, ObjEntity name should be unique in the runtime. Like you said it is easy 
> to fix by renaming. I think we should start using DataMaps for namespacing in 
> Cayenne eventually.
> 
> Hope your *table* names are different though. Here is a real namespacing bug 
> that needs to be addressed:
> 
> https://issues.apache.org/jira/browse/CAY-2036
> https://issues.apache.org/jira/browse/CAY-1152
> 
> Andrus
> 
> 
>> On Mar 26, 2016, at 7:31 PM, Hugi Thordarson <[email protected]> wrote:
>> 
>> Hi all.
>> I just stumbled into a problem where two of my cayenne projects have the 
>> same entity name (but different DataObject classes, of course) and this is 
>> causing conflicts in behaviour, when both projects are running in the same 
>> ServerRuntime.
>> 
>> I’m guessing I’m pretty much borked and should rename one of the entities?
>> 
>> Are people using any method for namespacing their entities in Cayenne? In 
>> EOF we usually added a prefix to the entity name to avoid stuff like this.
>> 
>> Cheers,
>> - hugi
> 

Reply via email to