You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by YK 7 <yk...@gmail.com> on 2012/02/18 15:43:45 UTC

Cayenne modeler problem

Hi,

A unique db table identifier is (at least): DB Schema+Table Name

Cayenne modeler should not display a validation failure when we have
different data nodes with tables having the same name.

If you can't fix that, it means that Cayenne 'drives' development and not
the existing databases...

In Java language, a class identifier is (at least): package name + class
name. sometimes we also need the jar name and the network where the code
resides.


Thanks

Re: Cayenne modeler problem

Posted by Andrus Adamchik <an...@objectstyle.org>.
> It seems that this bug was created on 2008 !!

I placed it on my shortlist. I certainly want it to happen.

> I'm wondering what if we use the same pattern for db entities: name and
> tableName

I am a bit reluctant to add another layer of required aliases. DbEntities with few exceptions are not references directly by the app code, so there's no much benefit in having them. We'll probably start with fully qualified names. 

Andrus


On Feb 20, 2012, at 11:26 PM, YK 7 wrote:
> Thanks Andrus!
> 
> It seems that this bug was created on 2008 !!
> 
> However, when taking a look at the cayenne's configuration file, I noticed
> that
> object entities haven't this problem because we are using a name and a
> className:
> - name="some alias",
> - className="fully class name" = package + actual class names
> 
> I'm wondering what if we use the same pattern for db entities: name and
> tableName
> - name="some alias"
> - tableName = "fully table name" which would be schema + actual table name
> (this depends on the database used)
> 
> 
> Thanks
> 
> 
> On Mon, Feb 20, 2012 at 8:57 AM, Andrus Adamchik <an...@objectstyle.org>wrote:
> 
>> Yep, we do: https://issues.apache.org/jira/browse/CAY-1152
>> 
>> On Feb 20, 2012, at 10:53 AM, Andrus Adamchik wrote:
>> 
>>> Hi there,
>>> 
>>> Agreed. Using schema to disambiguate the name in the mapping is
>> definitely something we should do. I think we even had a Jira to that
>> extent somewhere (??).
>>> 
>>> Andrus
>>> 
>>> On Feb 18, 2012, at 5:43 PM, YK 7 wrote:
>>>> Hi,
>>>> 
>>>> A unique db table identifier is (at least): DB Schema+Table Name
>>>> 
>>>> Cayenne modeler should not display a validation failure when we have
>>>> different data nodes with tables having the same name.
>>>> 
>>>> If you can't fix that, it means that Cayenne 'drives' development and
>> not
>>>> the existing databases...
>>>> 
>>>> In Java language, a class identifier is (at least): package name + class
>>>> name. sometimes we also need the jar name and the network where the code
>>>> resides.
>>>> 
>>>> 
>>>> Thanks
>>> 
>>> 
>> 
>> 


Re: Cayenne modeler problem

Posted by YK 7 <yk...@gmail.com>.
Thanks Andrus!

It seems that this bug was created on 2008 !!

However, when taking a look at the cayenne's configuration file, I noticed
that
object entities haven't this problem because we are using a name and a
className:
- name="some alias",
- className="fully class name" = package + actual class names

I'm wondering what if we use the same pattern for db entities: name and
tableName
- name="some alias"
- tableName = "fully table name" which would be schema + actual table name
(this depends on the database used)


Thanks


On Mon, Feb 20, 2012 at 8:57 AM, Andrus Adamchik <an...@objectstyle.org>wrote:

> Yep, we do: https://issues.apache.org/jira/browse/CAY-1152
>
> On Feb 20, 2012, at 10:53 AM, Andrus Adamchik wrote:
>
> > Hi there,
> >
> > Agreed. Using schema to disambiguate the name in the mapping is
> definitely something we should do. I think we even had a Jira to that
> extent somewhere (??).
> >
> > Andrus
> >
> > On Feb 18, 2012, at 5:43 PM, YK 7 wrote:
> >> Hi,
> >>
> >> A unique db table identifier is (at least): DB Schema+Table Name
> >>
> >> Cayenne modeler should not display a validation failure when we have
> >> different data nodes with tables having the same name.
> >>
> >> If you can't fix that, it means that Cayenne 'drives' development and
> not
> >> the existing databases...
> >>
> >> In Java language, a class identifier is (at least): package name + class
> >> name. sometimes we also need the jar name and the network where the code
> >> resides.
> >>
> >>
> >> Thanks
> >
> >
>
>

Re: Cayenne modeler problem

Posted by Andrus Adamchik <an...@objectstyle.org>.
Yep, we do: https://issues.apache.org/jira/browse/CAY-1152

On Feb 20, 2012, at 10:53 AM, Andrus Adamchik wrote:

> Hi there,
> 
> Agreed. Using schema to disambiguate the name in the mapping is definitely something we should do. I think we even had a Jira to that extent somewhere (??). 
> 
> Andrus
> 
> On Feb 18, 2012, at 5:43 PM, YK 7 wrote:
>> Hi,
>> 
>> A unique db table identifier is (at least): DB Schema+Table Name
>> 
>> Cayenne modeler should not display a validation failure when we have
>> different data nodes with tables having the same name.
>> 
>> If you can't fix that, it means that Cayenne 'drives' development and not
>> the existing databases...
>> 
>> In Java language, a class identifier is (at least): package name + class
>> name. sometimes we also need the jar name and the network where the code
>> resides.
>> 
>> 
>> Thanks
> 
> 


Re: Cayenne modeler problem

Posted by Andrus Adamchik <an...@objectstyle.org>.
Hi there,

Agreed. Using schema to disambiguate the name in the mapping is definitely something we should do. I think we even had a Jira to that extent somewhere (??). 

Andrus

On Feb 18, 2012, at 5:43 PM, YK 7 wrote:
> Hi,
> 
> A unique db table identifier is (at least): DB Schema+Table Name
> 
> Cayenne modeler should not display a validation failure when we have
> different data nodes with tables having the same name.
> 
> If you can't fix that, it means that Cayenne 'drives' development and not
> the existing databases...
> 
> In Java language, a class identifier is (at least): package name + class
> name. sometimes we also need the jar name and the network where the code
> resides.
> 
> 
> Thanks