We have a big table with a lot of columns. After we moved to MySQL Cluster, the table cannot be created because of:
ERROR 1118 (42000): Row size too l
I had a similar problem, and solved it by using @Externalizer annotation and Jackson to serialize/deserialize data (@Externalizer is OpenJPA-specific annotation, so you have to check with your JPA implementation similar possibility).
@Persistent
@Column(name = "params")
@Externalizer("toJSON")
private Params params;
Params class implementation:
public class Params {
private static final ObjectMapper mapper = new ObjectMapper();
private Map map;
public Params () {
this.map = new HashMap();
}
public Params (Params another) {
this.map = new HashMap();
this.map.putAll(anotherHolder.map);
}
public Params(String string) {
try {
TypeReference
HTH