You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Hugi Thordarson <hu...@karlmenn.is> on 2017/12/06 15:48:24 UTC

CreateIfNoSchemaStrategy with multiple DataMaps/DataNodes

Hi all,

a little dilemma. On application startup, I need to generate a DB schema for only one DataMap/DataNode in a multi DataMap/DataNode environment.

CreateIfNoSchemaStrategy isn't quite cutting it since it will check for existence of *all* DbEntity names in the DataDomain, including DbEntity names from other DataNodes—which it finds exists and and thus won't generate any schema at all.

Would you consider this a bug or expected behaviour? I'd think CreateIfNoSchemaStrategy should only check for names of DbEntities in DataMaps related to the DataNode.

Cheers,
- hugi

Re: CreateIfNoSchemaStrategy with multiple DataMaps/DataNodes

Posted by Hugi Thordarson <hu...@karlmenn.is>.
Thanks Andrus, yes, this was not the behaviour I expected. I wrote a fix for my own project and will soon take a better look at improvements to submit, once this crazy christmas season slows down.

Cheers,
- hugi



> On 6 Dec 2017, at 16:27, Andrus Adamchik <an...@objectstyle.org> wrote:
> 
> From this description looks like a bug.
> 
> Andrus
> 
> 
>> On Dec 6, 2017, at 10:48 AM, Hugi Thordarson <hu...@karlmenn.is> wrote:
>> 
>> Hi all,
>> 
>> a little dilemma. On application startup, I need to generate a DB schema for only one DataMap/DataNode in a multi DataMap/DataNode environment.
>> 
>> CreateIfNoSchemaStrategy isn't quite cutting it since it will check for existence of *all* DbEntity names in the DataDomain, including DbEntity names from other DataNodes—which it finds exists and and thus won't generate any schema at all.
>> 
>> Would you consider this a bug or expected behaviour? I'd think CreateIfNoSchemaStrategy should only check for names of DbEntities in DataMaps related to the DataNode.
>> 
>> Cheers,
>> - hugi
> 


Re: CreateIfNoSchemaStrategy with multiple DataMaps/DataNodes

Posted by Andrus Adamchik <an...@objectstyle.org>.
From this description looks like a bug.

Andrus


> On Dec 6, 2017, at 10:48 AM, Hugi Thordarson <hu...@karlmenn.is> wrote:
> 
> Hi all,
> 
> a little dilemma. On application startup, I need to generate a DB schema for only one DataMap/DataNode in a multi DataMap/DataNode environment.
> 
> CreateIfNoSchemaStrategy isn't quite cutting it since it will check for existence of *all* DbEntity names in the DataDomain, including DbEntity names from other DataNodes—which it finds exists and and thus won't generate any schema at all.
> 
> Would you consider this a bug or expected behaviour? I'd think CreateIfNoSchemaStrategy should only check for names of DbEntities in DataMaps related to the DataNode.
> 
> Cheers,
> - hugi