>> The bottom line is that Cayenne does not support multiple DbEntities
>> with the same name in the same DataMap (even if they are in different
>> schemas).
>
> IIRC EOModeler faces the same problem and uses the fully qualified name
> as internal table name; I think EOEntities with the same automagic name
> are automatically numbered. Maybe that would work? I just had a quick
> look, DataMap uses DbEntity.getName() as key and that can cause clashes,
> but if the name would rather be the schema.table FQDEN - just like a
> package namespace, what it really is - this could be avoided. Don't know
> how much this would affect the rest of the framework, but it probably
> wouldn't break anything - a unique lookup is still a unique lookup.
> The only theoretical thing that might suffer would be DataMap
> portability between DBs with and without schema support.
This was it. Right now our DataMap is somewhat database-transparent. BTW,
DbEntity has getFullyQualifiedName() that is used for SQL translation.
>
>> So maybe we should change the DbLoader to create multiple DataMaps -
>> one per schema?
>
> That's another possibility and probably less intrusive, only (?)
> affected methods would be loadDataMapFromDB() and its caller
> ImportDbAction.loadMap().
> No idea what would be better..maybe Craig or Andriy?
I'd like to hear other opinions too...
Andrus
This archive was generated by hypermail 2.0.0 : Tue Feb 04 2003 - 17:38:21 EST