Unsuccessful: create table BLC_SKU_FULFILLMENT_FLAT_RATES
Posted: Tue Jul 31, 2012 12:32 pm
Hi,
I moved to a MySQL backend with the following:
- running within Tomcat 7.0.29
- MySQL 5.25
- Hibernate dialect changed to MYSQLDialect
When starting the main site, upon creating the DDL for SkuImpl, the properties "fulfillmentFlatRates" fails
to be translated into working SQL:
Blobs cannot (or at least should not) be used as (part of) PK with MySQL.
Seems the type is wrong because in the Map<FulfillmentOption, BigDecimal>, FulfillmentOption is mapped in hibernate as a SerializableType because (I think) both @MapKeyJoinColumn and @MapKeyColumn are being used at the same time, and @MapKeyColumn appears last. It looks like just @MapKeyJoinColumn should be there (@MapKeyColumn is for simple types).
Is anyone else having the same issue ?
Regards,
Romain
I moved to a MySQL backend with the following:
- running within Tomcat 7.0.29
- MySQL 5.25
- Hibernate dialect changed to MYSQLDialect
When starting the main site, upon creating the DDL for SkuImpl, the properties "fulfillmentFlatRates" fails
to be translated into working SQL:
Code: Select all
[ERROR] 18:11:35 SchemaExport - Unsuccessful: create table BLC_SKU_FULFILLMENT_FLAT_RATES (SKU_ID bigint not null, RATE decimal(19,5), FULFILLMENT_OPTION_ID tinyblob not null, primary key (SKU_ID, FULFILLMENT_OPTION_ID))
Blobs cannot (or at least should not) be used as (part of) PK with MySQL.
Seems the type is wrong because in the Map<FulfillmentOption, BigDecimal>, FulfillmentOption is mapped in hibernate as a SerializableType because (I think) both @MapKeyJoinColumn and @MapKeyColumn are being used at the same time, and @MapKeyColumn appears last. It looks like just @MapKeyJoinColumn should be there (@MapKeyColumn is for simple types).
Is anyone else having the same issue ?
Regards,
Romain