Hmm, so NHibernate simply doesn't check for quote characters.
When we don't add them, they don't add them (bad) and when we do add them, they don't check (bad).
Anyway, as we can't fix this as it will affect other users, I can only suggest a workaround for you. Please follow the following steps. This defines a copy of the template you're going to change and 'override' the original binding so it will use your copy instead of the original one. This makes it easier to keep the changes when you download a new version.
- Create a copy of <llblgen pro installation folder>\Frameworks\NHibernate\Templates\Shared\Shared\generalTemplateUtils.lpt
- Open that copy in the llblgen pro designer, by simply dragging it onto it.
- Go to line 458, and remove the [] characters.
- Save
You now have a copy of a template. To make the designer use it, create a new templatebindings file with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<templateBindings name="SD.NHibernate.Custom" description="Custom Template bindings for the templates specific for NHibernate support for LLBLGen Pro" precedenceLevel="11" xmlns="http://sd/llblgen/pro/templateBindingsDefinition.xsd">
<supportedPlatforms>
<platform name=".NET 2.0"/>
<platform name=".NET 3.0"/>
<platform name=".NET 3.5"/>
<platform name=".NET 4.0"/>
</supportedPlatforms>
<supportedFrameworks>
<framework name="NHibernate"/>
</supportedFrameworks>
<supportedDrivers>
<driver id="2D18D138-1DD2-467E-86CC-4838250611AE"/> <!-- SQL Server -->
<driver id="3FABDE1A-21DF-4fcb-96FD-BBFA8F18B1EA"/> <!-- Sybase iAnywhere / ASA -->
<driver id="758A392F-06F3-498b-AED9-D85A4C795BDA"/> <!-- MySql -->
<driver id="88EBFD8C-CBDD-4452-88AF-1C99E41A123F"/> <!-- PostgreSql -->
<driver id="A3076322-977C-4e28-BFF4-F25ED096D1DB"/> <!-- Sybase Advanced Server Enterprise / ASE -->
<driver id="A8034CB0-319D-4cdd-BC7D-1E7CFDBA3B74"/> <!-- ODP.NET Oracle -->
<driver id="BB438EBA-A0B5-4236-A2B8-64D828A138AF"/> <!-- DB2 -->
<driver id="BCF16BE3-7E29-4E07-AC27-9FBF79D3CA7A"/> <!-- Firebird -->
<driver id="DE158D99-1B10-4d88-8DEA-888E7930FF40"/> <!-- MS Oracle -->
</supportedDrivers>
<language name="C#">
<templateBinding templateID="SD_NHibernateGeneralUtils" filename="Shared\Shared\YourCopyOfGeneralTemplateUtils.lpt" templateLanguage="C#"/>
</language>
</templateBindings>
place this file in the folder <llblgen pro installation folder>\Frameworks\NHibernate\Templates
In the xml above, you have to change the name of YourCopyOfGeneralTemplateUtils to the real name you gave to the copy of the generalTemplateUtils.lpt file of course.
Re-start the designer. When generating code, by pressing F7, go to tab 2 in the dialog. You'll see the templatebindings file 'SD.NHibernate.Custom' be placed above the SD.NHibernate' templatebindings file. If not, move it above it with the up button.
Generate code. Your mappings should now not have [] characters around column names.
You can also place the custom templatebindings in another folder (you then have to adjust the local path in the templatebindings file of course, as it's relative to the templatebindings file) and specify that folder in the project properties in the designer (additional templates folder).
If you run into problems with this, please let us know and we'll help you further.