0

My model contains the entities Order and Orderline. The Orderline has a property of type Order:

<cf:project 
    persistencePropertyNameFormat="{1}"        
    persistenceTableIdentifierSeparatorChar=""
    persistenceRelationIdentifierSeparatorChar="" ...>  

    <cf:entity name="Orderline">
        <cf:property name="Id"/>
        <cf:property name="Order" typeName="{0}.Order" />
    </cf:entity>

CodeFluent has created a database containing a table named Orderline with a column named Order_Id. How can I remove the underscore in the name of this column? I tried to specify an empty string for the persistenceTableIdentifierSeparatorChar and persistenceRelationIdentifierSeparatorChar attributes, but that didn't help.

Gynteniuxas
  • 7,035
  • 18
  • 38
  • 54
Willem
  • 111
  • 4
  • persistencePropertyNameFormat="{1}" is indeed the way to do it http://blog.codefluententities.com/2011/02/02/persistence-property-name-format/. You don't need the xxChar attributes. Are you sure you have regenerated the database or you're looking at the good tables? Also please make sure you don't have a custom naming convention. – Simon Mourier Jan 24 '16 at 06:58
  • By default the name of the column for the foreign key is Orderline_Order_Id. By using persistencePropertyNameFormat="{1}" the name of the column becomes Order_Id. However, I want OrderId. How can I achieve this? – Willem Jan 25 '16 at 19:50
  • Add a `persistenceName="OrderId"` attribute on the Order property. – Simon Mourier Jan 25 '16 at 21:39
  • I just discovered the custom naming feature of CodeFluent (https://www.softfluent.com/documentation/NC_ImplementingACustomNamingConvention.html). How can I remove the underscores in the column names with this feature? – Willem Apr 05 '16 at 18:57
  • you should ask another question – Simon Mourier Apr 06 '16 at 07:29

0 Answers0