codefluent

Is there an equivalent to updateSchema="false" that applies to individual entities?


Setting updateSchema="false" in the configuration section of the XML file for the SQL producer will prevent Codefluent from altering the schema (i.e. field names, field type, indexes, etc) of the SQL table while still allowing for the creating of stored procedures and methods against the table. This is discussed in the blog article https://blog.codefluententities.com/2011/10/31/interoperate-with-an-existing-database-using-codefluent-entities/

Question

Is there anything built in that would achieve the same effect but apply only apply to the underlying tables of specific entities?


Solution

  • You can disable table diffs generation for a specific entity using an attribute:

    <cf:entity name="Customer" cfps:produceTableDiff="false">
      <cf:property name="Id" key="true" />
    </cf:entity>