Model Versioning

Say you developed your application using CodeFluent Entities and shipped several versions of your application: how can you know from the code in production which model version was used to generate it?

First, in SQL a cf_modelVersion function is generated which allows you to retrieve a “model version number” indicating the model version used to generate the current SQL.

Likewise, in the generated Business Object Model (BOM), you’ll find something like this:

[assembly: CodeFluent.Runtime.Utilities.CodeFluentGeneratedAttribute("1.0.50204.0578", "CodeFluent Entities generated ( Date: Wednesday, 23 February 2011 22:20.", CodeFluent.Runtime.Utilities.CodeFluentGeneratedAttributeOptions.CompiledWithCodeFluent, 1431726511u)]

As you can see it also contains the same model version number: starting from the code, you can know which model version was used to generate them, and in addition, you can check that the BOM and SQL are consistent.

In fact, the CodeFluent Runtime even provides a method to do so programmatically:

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

Leave a Reply

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

You are commenting using your 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