You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Harunobu Oyama <ho...@telensa.com> on 2016/07/11 13:38:33 UTC

table/field names with more than one words

Hi,


This is my firs post to this ML.

I am using Cayenne 3.1.1 with PostreSQL 9.x.
We build our data model on a DB modeling tool, export DDL and execute it on
PostgreSQL, and then import the schema to Cayenne using SmartNamingStrategy.
In our naming convention, all names in DB are all UPPERCASELIKETHIS.

It gives good looking names as long as the table/filed names are just one
word.

What is the recommended way or good practice when the table names / field
names
consist of more than one word? The possible options I can think of are:

Option-1: amend the object/attribute names one by one on CayenneModeler
Option-2: give physical names on DB schema in CamelNotation.

As I am against editing names one by one manually, I was thinking to use
Option-2,
however, it is against our naming convention. We will change our convention
if it is
necessary, but I was wondering how other people are handling this.

Could you share your views on this, please?


Best regards,
Harunobu Oyama

Re: table/field names with more than one words

Posted by Harunobu Oyama <ho...@telensa.com>.
Michael,

Thank you for the confirmation. Yes, it does work in the way expected.

thanks,
nobu


On 11 July 2016 at 16:20, Michael Gentry <bl...@gmail.com> wrote:

> To confirm what Ari said, Database Entity (table) ARTIST_PAINTING becomes
> Object Entity (Java class) ArtistPainting by default, but you can rename
> this is Cayenne to use a class name of your choosing if you don't like the
> default name.
>
> mrg
>
>
> On Mon, Jul 11, 2016 at 10:11 AM, Harunobu Oyama <ho...@telensa.com> wrote:
>
> > Ari,
> >
> > Thank you for your advice. I will suggest separating words with under bar
> > to the team.
> >
> > nobu
> >
> >
> > On 11 July 2016 at 15:08, Aristedes Maniatis <ar...@maniatis.org> wrote:
> >
> > > On 11/07/2016 11:38pm, Harunobu Oyama wrote:
> > > > Hi,
> > > >
> > > >
> > > > This is my firs post to this ML.
> > > >
> > > > I am using Cayenne 3.1.1 with PostreSQL 9.x.
> > > > We build our data model on a DB modeling tool, export DDL and execute
> > it
> > > on
> > > > PostgreSQL, and then import the schema to Cayenne using
> > > SmartNamingStrategy.
> > > > In our naming convention, all names in DB are all UPPERCASELIKETHIS.
> > > >
> > > > It gives good looking names as long as the table/filed names are just
> > one
> > > > word.
> > > >
> > > > What is the recommended way or good practice when the table names /
> > field
> > > > names
> > > > consist of more than one word? The possible options I can think of
> are:
> > > >
> > > > Option-1: amend the object/attribute names one by one on
> CayenneModeler
> > > > Option-2: give physical names on DB schema in CamelNotation.
> > > >
> > > > As I am against editing names one by one manually, I was thinking to
> > use
> > > > Option-2,
> > > > however, it is against our naming convention. We will change our
> > > convention
> > > > if it is
> > > > necessary, but I was wondering how other people are handling this.
> > >
> > >
> > > Its been a while since I used this feature, but I believe that a
> database
> > > table called "ARTIST_PAINTING" will be converted to an Object Entity
> name
> > > of ArtistPainting. Have you tested that?
> > >
> > > Ari
> > >
> > >
> > >
> > > --
> > > -------------------------->
> > > Aristedes Maniatis
> > > GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
> > >
> >
>

Re: table/field names with more than one words

Posted by Michael Gentry <bl...@gmail.com>.
To confirm what Ari said, Database Entity (table) ARTIST_PAINTING becomes
Object Entity (Java class) ArtistPainting by default, but you can rename
this is Cayenne to use a class name of your choosing if you don't like the
default name.

mrg


On Mon, Jul 11, 2016 at 10:11 AM, Harunobu Oyama <ho...@telensa.com> wrote:

> Ari,
>
> Thank you for your advice. I will suggest separating words with under bar
> to the team.
>
> nobu
>
>
> On 11 July 2016 at 15:08, Aristedes Maniatis <ar...@maniatis.org> wrote:
>
> > On 11/07/2016 11:38pm, Harunobu Oyama wrote:
> > > Hi,
> > >
> > >
> > > This is my firs post to this ML.
> > >
> > > I am using Cayenne 3.1.1 with PostreSQL 9.x.
> > > We build our data model on a DB modeling tool, export DDL and execute
> it
> > on
> > > PostgreSQL, and then import the schema to Cayenne using
> > SmartNamingStrategy.
> > > In our naming convention, all names in DB are all UPPERCASELIKETHIS.
> > >
> > > It gives good looking names as long as the table/filed names are just
> one
> > > word.
> > >
> > > What is the recommended way or good practice when the table names /
> field
> > > names
> > > consist of more than one word? The possible options I can think of are:
> > >
> > > Option-1: amend the object/attribute names one by one on CayenneModeler
> > > Option-2: give physical names on DB schema in CamelNotation.
> > >
> > > As I am against editing names one by one manually, I was thinking to
> use
> > > Option-2,
> > > however, it is against our naming convention. We will change our
> > convention
> > > if it is
> > > necessary, but I was wondering how other people are handling this.
> >
> >
> > Its been a while since I used this feature, but I believe that a database
> > table called "ARTIST_PAINTING" will be converted to an Object Entity name
> > of ArtistPainting. Have you tested that?
> >
> > Ari
> >
> >
> >
> > --
> > -------------------------->
> > Aristedes Maniatis
> > GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
> >
>

Re: table/field names with more than one words

Posted by Harunobu Oyama <ho...@telensa.com>.
Ari,

Thank you for your advice. I will suggest separating words with under bar
to the team.

nobu


On 11 July 2016 at 15:08, Aristedes Maniatis <ar...@maniatis.org> wrote:

> On 11/07/2016 11:38pm, Harunobu Oyama wrote:
> > Hi,
> >
> >
> > This is my firs post to this ML.
> >
> > I am using Cayenne 3.1.1 with PostreSQL 9.x.
> > We build our data model on a DB modeling tool, export DDL and execute it
> on
> > PostgreSQL, and then import the schema to Cayenne using
> SmartNamingStrategy.
> > In our naming convention, all names in DB are all UPPERCASELIKETHIS.
> >
> > It gives good looking names as long as the table/filed names are just one
> > word.
> >
> > What is the recommended way or good practice when the table names / field
> > names
> > consist of more than one word? The possible options I can think of are:
> >
> > Option-1: amend the object/attribute names one by one on CayenneModeler
> > Option-2: give physical names on DB schema in CamelNotation.
> >
> > As I am against editing names one by one manually, I was thinking to use
> > Option-2,
> > however, it is against our naming convention. We will change our
> convention
> > if it is
> > necessary, but I was wondering how other people are handling this.
>
>
> Its been a while since I used this feature, but I believe that a database
> table called "ARTIST_PAINTING" will be converted to an Object Entity name
> of ArtistPainting. Have you tested that?
>
> Ari
>
>
>
> --
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>

Re: table/field names with more than one words

Posted by Aristedes Maniatis <ar...@maniatis.org>.
On 11/07/2016 11:38pm, Harunobu Oyama wrote:
> Hi,
> 
> 
> This is my firs post to this ML.
> 
> I am using Cayenne 3.1.1 with PostreSQL 9.x.
> We build our data model on a DB modeling tool, export DDL and execute it on
> PostgreSQL, and then import the schema to Cayenne using SmartNamingStrategy.
> In our naming convention, all names in DB are all UPPERCASELIKETHIS.
> 
> It gives good looking names as long as the table/filed names are just one
> word.
> 
> What is the recommended way or good practice when the table names / field
> names
> consist of more than one word? The possible options I can think of are:
> 
> Option-1: amend the object/attribute names one by one on CayenneModeler
> Option-2: give physical names on DB schema in CamelNotation.
> 
> As I am against editing names one by one manually, I was thinking to use
> Option-2,
> however, it is against our naming convention. We will change our convention
> if it is
> necessary, but I was wondering how other people are handling this.


Its been a while since I used this feature, but I believe that a database table called "ARTIST_PAINTING" will be converted to an Object Entity name of ArtistPainting. Have you tested that?

Ari



-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A