Я создал игровое приложение и у меня есть несколько моделей.Один из них содержит набор объектов, но jpa не может создать таблицу ...
package models;
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;
import java.util.Set;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.Table;
import play.db.jpa.Model;
@Entity
public class Receipt extends Model {
@ElementCollection
Set<Serving> servings;
DiningTable table;
public Receipt(Set<Serving> servings, DiningTable table) {
super();
this.servings = servings;
this.table = table;
}
}
И ошибка
21:20:47,323 INFO ~ Listening for HTTP on port 9000 (Waiting a first request to start) ...
21:20:51,935 INFO ~ Connected to jdbc:mysql://localhost/rms_?>useUnicode=yes&characterEncoding=UTF-8&connectionCollation=utf8_general_ci
21:20:52,827 ERROR ~ Unsuccessful: create table Receipt (id bigint not null auto_increment, >table tinyblob, primary key (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8
21:20:52,827 ERROR ~ You have an error in your SQL syntax; check the manual that >corresponds to your MySQL server version for the right syntax to use near 'table tinyblob, >primary key (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8' at line 1
21:20:53,183 ERROR ~ Unsuccessful: alter table Receipt_Serving add index FKB18778C559F3AF16 >(Receipt_id), add constraint FKB18778C559F3AF16 foreign key (Receipt_id) references Receipt >(id)
21:20:53,183 ERROR ~ Can't create table 'rms_.#sql-731_f2' (errno: 150)
21:20:53,414 INFO ~ Application 'rms' is now started !
Как я могу решить эту проблему?