.hbm.xml Files look like gibberish

Apr 7, 2009 at 7:27 PM

I tried using this tool, and when i open the mapping files they look like this:
㼼浸敶獲潩㵮ㄢ〮•湥潣楤杮∽瑵ⵦ㘱㼢ാ㰊楨敢湲瑡ⵥ慭灰湩⁧獡敳扭祬∽潖畬瑮敥㉲䐮䱁•浸湬㵳產湲渺楨敢湲瑡ⵥ慭灰湩ⵧ⸲∲ാ 㰠汣獡⁳慮敭∽潖畬瑮敥㉲䐮䱁䄮瑣癩獥慴畴ⱳ嘠汯湵整牥⸲䅄≌琠扡敬∽捁楴敶瑓瑡獵•
Opening them in notepad they look ok.  Any ideas?
May 5, 2009 at 7:57 PM
I had the same issue and resolved it in the following steps:

1. Right click in the XML editor and select Properties;
2. Change encoding to Unicode (UTF-8);
3. Save;

Repeat for all mappings files.
May 5, 2009 at 8:52 PM
Thanks!  I ended up copying the contents from notepad and pasting it over the contents in visual studios.   Sadly we probably won't be using this tool because it doesn't do properties or any kind of casing.   This would be fantastic if we could set the type of casing we would like (IE camel casing or same as the db),  and if we could set a prefix for the fields like an _  or m.

It's a good tool for basic mapping if you don't have standards already in place.
Sep 16, 2009 at 1:07 AM
Edited Sep 16, 2009 at 2:03 AM

This tool could potentially be very good. Two big pitfalls are that it doesn't create properties and doesn't seem to work correctly from SQL Server Express - field types getting mixed up.

UPDATE: Had a look at source code and field types gettting mixed up is easily fixed - nchar incorrectly mapped. Also spotted bug with isNullable column, reading wrong field and no validation for NULLS, again easily fixed