Home > Oracle Database, SQL Server, SQLAzure > Persistence Property Name Format

Persistence Property Name Format


By default, CodeFluent Entities persistence producers generate columns by the following name format: (TableName)_(ColumnName). For instance if a “Customer” entity contains a “Name” property the default generated column would be named “Customer_Name”. This behavior is controlled by the “persistencePropertyNameFormat” attribute which can be set at the project level.

By default, the persistencePropertyNameFormat is set to {0}_{1} where {0} is the table name, and {1} as the column name. So, say we want to generate columns without them being prefixed by the entity name, all we’d have to do would be to set the persistencePropertyNameFormat to {1}, and the change would be applied application wide!

Please note, that you can also change column names at the property level by defining an explicit “persistenceName” on the property. Furthermore, you can also control all generated names (tables, columns, constraints, stored procedures) at the project level through naming conventions (discussed in this post).

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s