|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Character set / encoding in tables ?Hi,
I can't seem to find anywhere to set what encoding I want in my tables (the DEFAULT CHARSET statement after a create table) ? Right now it's defaulted to "latin1" in my mySQL database. I would like it to be UTF-8. Also, where do I specify InnoDB engine, and not the default MyISAM, if I want that (the ENGINE statement after a create table) ? Thanks, :-) Kasper _______________________________________________ eclipselink-users mailing list eclipselink-users@... https://dev.eclipse.org/mailman/listinfo/eclipselink-users |
|
|
Re: Character set / encoding in tables ?Hi Kaspar,
JPA table creation is intended to provide some basic table creation. If you want something that goes beyond the basics, I suggest you use EclipseLink to output the DDL generation statements and then edit them to be what you want. You can do that by setting the following properties in your persistence.xml. "eclipselink.ddl-generation" can be set to either "create-tables" or "drop-and-create-tables" "eclipselink.ddl-generation.output-mode" can be set to "sql-script" "eclipselink.create-ddl-jdbc-file-name" and "eclipselink.drop-ddl-jdbc-file-name" should be set to the appropriate file location. -Tom Kasper Hansen wrote: > Hi, > > I can't seem to find anywhere to set what encoding I want in my tables > (the DEFAULT CHARSET statement after a create table) ? Right now it's > defaulted to "latin1" in my mySQL database. I would like it to be UTF-8. > > Also, where do I specify InnoDB engine, and not the default MyISAM, if I > want that (the ENGINE statement after a create table) ? > > Thanks, > > :-) Kasper > > > ------------------------------------------------------------------------ > > _______________________________________________ > eclipselink-users mailing list > eclipselink-users@... > https://dev.eclipse.org/mailman/listinfo/eclipselink-users eclipselink-users mailing list eclipselink-users@... https://dev.eclipse.org/mailman/listinfo/eclipselink-users |
|
|
Re: Character set / encoding in tables ?Hi Tom,
Thanks for the info. I've done as you said, and made a class which can parse the generated file, adding the info (engine, auto_increment and character set) and writing it out to another file. That file is then being automatically executed in mysql. The process is started from a unit test, which tests and sets up my entire database for a development setup. Cheers. On Mon, Feb 9, 2009 at 2:42 PM, Tom Ware <tom.ware@...> wrote: Hi Kaspar, _______________________________________________ eclipselink-users mailing list eclipselink-users@... https://dev.eclipse.org/mailman/listinfo/eclipselink-users |
| Free embeddable forum powered by Nabble | Forum Help |