Bonjour,
Je me casse la tete sur un problème qui in fine doit etre assez bidon...
j'ai mappé une classe option comme suit:
et lorsque je lance la création de ma base j'ai un message d'erreur:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <class name="com.calyon.customx.model.produit.Option" lazy="false" table="option"> <id name="id" type="long" unsaved-value="0"> <column name="option_id" not-null="true"/> <generator class="native"></generator> </id> <property name="callable" type="true_false" column="callable"/> <property name="putable" type="true_false" column="putable"/> <property name="switchable" type="true_false" column="switchable"/> <property name="putablePeriod" column="putable_period"/> <property name="callablePeriod" column="callable_period"/> <property name="switchablePeriod" column="switchable_period"/> </class>
J'arrive pas à comprendre d'où vient l'erreur surtout que j'ai déjà plusieurs table qui contiennent des boolean et que tout s'était très bien passé...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 StatementCallback; bad SQL grammar [create table option (option_id bigint not null auto_increment, callable char(1), putable char(1), switchable char(1), putable_period bigint, callable_period bigint, switchable_period bigint, primary key (option_id))]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'option (option_id bigint not null auto_increment, callable char(1), putable char' at line 1
Excusez moi s'il y a déjà des topics la dessus mais j'ai pas trouvé grand chose sur notre ami à tous...
Partager