tags:

views:

63

answers:

1

Hi, I am having a few errors like the following when I deploy my JPA entities into JBoss.


18:34:53,462 ERROR [SchemaExport] 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 'Group (id)' at line 1 18:34:53,684 ERROR [SchemaExport] Unsuccessful: alter table Value add index FK4E9A15132C855E3 (groupId), add constraint FK4E9A15132C855E3 foreign key (groupId) references Group (id)


Where do I look for the generated database script to create the tables ?I would like to take a look at it to debug my errors

Thanks.

A: 

Hi,

You can not use Group as a table name. GROUP is a SQL keyword, so we need to rename it.

Do the following

@Entity
@Table(name="GROUPI") // or other name
public class Group {

}

regards,

Arthur Ronald F D Garcia