| Author |
Message |
|
2006/11/28 05:07
|
|
|
ik
Joined: 2006/11/28
Messages: 4
Offline
|
|
|
|
Hi, I have an ERD diagram, and I am trying to generate a C# library to be used in an application. It uses MySQL.
All the process is ok, except, if I use a form to do any changes to the DB, I get the exception: "The dialect was not set. Set the property hibernate.dialect."
in the folowing row:
private DataStoragePersistentManager() : base(_connectionSetting, _sessionType) {
} |
Can anyone tell me how to try to get rid of this, or that another information may help? P.S. in the xml file the dialect is set...
|
|
|
|
 |
| |
|
2006/11/28 12:00
|
|
|
Jick
Joined: 2005/04/29
Messages: 2880
Offline
|
|
|
|
Hi ik,
Please make sure the mapping XML file (xxxx.cfg.xml) is put correct. It should either embed in the dll/exe or place in working directory.
Best regards,
Jick
|
Visual Paradigm International Ltd.
http://www.visual-paradigm.com
Build Quality Applications Faster, Better and Cheaper |
|
|
|
 |
| |
|
2006/12/03 07:47
|
|
|
ik
Joined: 2006/11/28
Messages: 4
Offline
|
|
|
|
Oh, thanks, I have found my mistake. Sorry to take your time
|
|
|
|
 |
| |
|
2007/01/06 07:35
|
|
|
bdubs
Joined: 2007/01/03
Messages: 6
Offline
|
|
|
|
I had this same problem as well. The solution for this is on page 2-11 (Step 14) of the DB-VA Programmer's Guide for .NET. A better solution than copying it manually would be:
VISUAL STUDIO 2005
1. Copy it to the project directory
2. App -> Project -> Add -> Existing Item
3. Select "hibernate.cfg.xml"
4. In "hibernate.cfg.xml" properties
a. change Build Action to "None"
b. change Copy to Output Directory to "Always"
Embedding the hibernate.cfg.xml as a resource did not work for me in Visual Studio 2005.
-b
|
|
|
|
 |
| |
|
2007/01/11 14:48
|
|
|
bdubs
Joined: 2007/01/03
Messages: 6
Offline
|
|
|
|
Actually, I just updated my db schema, and realized that the .xml file didn't update. Adding a line like this to the post-build step is the best way to go:
copy $(SolutionDir)..\VisualParadigm\src\hibernate.cfg.xml $(TargetDir) |
|
|
|
|
 |
| |