Generating the entities with uppercase.

Posts   
 
    
Posts: 64
Joined: 30-Aug-2010
# Posted on: 21-Apr-2011 09:13:53   

Hello,

I have a question regarding the way the entity names are generated by the designer.

The project is using both Oracle and SqlServer databases. In Oracle all names (tables, sp, views) were written with upper case. In SqlServer there are some that were written with lower case, something like : UpdateParameters.

Could you please indicate if there is a property in the designer that can allow me to generate all entities with upper case: so I need the UpdateParameters to look like: UPDATEPARAMETERS.

Thank you.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 21-Apr-2011 09:21:42   

The generated code follows coding conventions and guidelines. Whether table names are in upper case or not, what's that got to do with the Entity names?

Posts: 64
Joined: 30-Aug-2010
# Posted on: 21-Apr-2011 16:34:59   

Good afternoon,

So, in our Oracle database all table names, view names, sp and functions names are written with uppercase.

But in SqlServer, there are some that were created with lowecase letters.

As our project works with both databases, in the bussiness logic of the application, I have for example the call : ActionProcedures.MYPROCNAME();

And whether it is compiled for Oracle, it calls the proc. for Oracle, if not, it calls for SqlServer.

As the LLBL generated MYPROCNAME() for Oracle, but MyProcName() for SqlServer, I have to make two distinct calls for this.

I am asking because in an older version of LLBL, the name were both generated with UPPERCASE, but I am just not able to find what needs to be checked/unchecked from the Designer's Properties or Preferences.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 21-Apr-2011 22:09:43   

There's no setting to make them all uppercase (you can with a simple plugin (see SDK for v3.0 how to do that, and the sourcecode archive for example plugins sourcecode to get started)), there is a setting to make the oracle ones be formulated using pascal casing, with or without removal of underscores: EnforcePascalCasingAlways MakeElementNamePascalCasing RemoveUnderscoresFromElementName

Could these settings help you in this? (project property setting affects your reverse engineering actions).

Frans Bouma | Lead developer LLBLGen Pro
Posts: 64
Joined: 30-Aug-2010
# Posted on: 22-Apr-2011 15:36:30   

Hello,thank you for the indications.

I am not sure that I have well understood what I have to do, but it is a starting point.

As for the moment, when reverse engineering in SqlServer, I just rewrote the name of the entity that was that had lowercase, with uppercase.

Thank you

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 22-Apr-2011 15:53:35   

fire_starter wrote:

Hello,thank you for the indications.

I am not sure that I have well understood what I have to do, but it is a starting point.

As for the moment, when reverse engineering in SqlServer, I just rewrote the name of the entity that was that had lowercase, with uppercase.

Thank you

Those settings can help converting the ORACLE names better simple_smile (to match the sqlserver names wink ).

But I think I don't quite understand what you want, unless you're still on v2.6. The thing is: with v3, you have 1 model, and for every element you can have mappings to multiple databases. This means that if you add a stored proc call from sqlserver, it gets the name like the proc in sqlserver. When you open it in the editor, you can create a mapping to Oracle and map it to an oracle proc as well. This means that you'll get a codebase with the same method names (there's just 1 proc call defined in the project) and this should solve your problem. Similar with entities.

So: use 1 database for reverse engineering (e.g. SQL Server) and add mappings to Oracle manually. The automapper in llblgen pro v3 can help you map the entities automatically to oracle, if the names match properly (casing not important) it likely finds the tables automatically.

Please confirm if I understood you correctly or not.

Frans Bouma | Lead developer LLBLGen Pro