Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Mapping Question - Key Order & Database Type

Using orm.xml may give more control of the order than annotations.  You could
also use a DescriptorCustomizer to change the order of the mappings or
primary key fields.

You may also consider using your own scripts to create your database, if you
need low-level control to add in your own optimizations.

For InnoDB, you can set this in your database as the default,
("default-table-type=innodb" in your MySQL config file).

There is no option in EclipseLink for setting the table type, perhaps log a
bug/enhancement for this.

The TableDefinition in the EclipseLink schemaframework used to create the
tables does have an API setCreationSuffix() that could be used to set the
table type, but you would need to use the DefaultTableGenerator direct to
have control to set this.



RogerV wrote:
> 
> Hi
> 
> When generating a Primary Key from an Enity definition that contains an
> @EmbeddedId class, how does EclipseLink decide which order to define the
> key fields in the database - it's not definition order? Can I control the
> order so that I can make the primary key efficient?
> 
> When generating tables for MySQL is there additional config that I can use
> to define the table type, it apears to be defaulting to MyISAM and I need
> InnoDB
> 
> Regards
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/Mapping-Question---Key-Order---Database-Type-tp25661912p25696912.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top