-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: hbm2dll for MySQL 5.5.x broken
PostPosted: Sun Mar 06, 2011 10:35 am 
Newbie

Joined: Mon Oct 03, 2005 12:07 pm
Posts: 8
Hi,

we face a strange problem with hbm2dll, I've documentated it in the Issue tracker:
http://opensource.atlassian.com/project ... e/HHH-5988

The Issue is that hbm2dll uses *TYPE=MyISAM* while since Mysql 5.5.x this is forbidden, you have to use *ENGINE=MyISAM*.

Nevertheless, I would like to know if there is some kind of workaround for that Issue. I am also wondering why this Bug was not revealed yet. Actually any hbm2dll update action that requires a table to be created seems to be broken from my point of view.

Is there some param we can set in the hibernate.cfg.xml to set a custom Type mapping for that?
Is there a hint where in the source code of hibernate this SQL is generated?

Thanks
Sebastian

_________________
http://www.laszlo-forum.de
http://www.webbase-design.de


Top
 Profile  
 
 Post subject: Re: hbm2dll for MySQL 5.5.x broken
PostPosted: Mon Mar 07, 2011 6:08 am 
Newbie

Joined: Mon Oct 03, 2005 12:07 pm
Posts: 8
you have to create your own dialect.

compare with:
http://code.google.com/p/snofyre/source ... alect.java

_________________
http://www.laszlo-forum.de
http://www.webbase-design.de


Top
 Profile  
 
 Post subject: Re: hbm2dll for MySQL 5.5.x broken
PostPosted: Mon Mar 07, 2011 6:09 am 
Newbie

Joined: Mon Oct 03, 2005 12:07 pm
Posts: 8
Code:
/**
* Crown Copyright (C) 2008 - 2011
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*         http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package uk.nhs.cfh.dsp.snomed.persistence.orm;

import org.hibernate.dialect.MySQL5Dialect;

/**
* A custom {@link org.hibernate.dialect.MySQL5Dialect} that uses MyISAM engine for MySQL version 5 +
*
* <br>Version : @#VersionNumber#@
* <br>Written by @author Jay Kola
* <br>Created on Jan 20, 2011 at 7:40:59 PM
*/
public class MySQL5MyISAMDialect extends MySQL5Dialect {

    @Override
    public String getTableTypeString() {
        return " ENGINE=MyISAM";
    }

    @Override
    public boolean dropConstraints() {
        return false;
    }
}

_________________
http://www.laszlo-forum.de
http://www.webbase-design.de


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.