ide:eclipse:jpa
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| ide:eclipse:jpa [2016/12/30 01:47] – Création root | ide:eclipse:jpa [2020/05/10 23:59] (Version actuelle) – Suppression de la taille par défaut pour les images root | ||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| ====Schema " | ====Schema " | ||
| + | |||
| + | ===Possibilité 1=== | ||
| Il faut générer les tables depuis les entités. | Il faut générer les tables depuis les entités. | ||
| Clique-droit sur le projet, '' | Clique-droit sur le projet, '' | ||
| - | {{: | + | {{: |
| Pour que cela marche, il faut que dans le '' | Pour que cela marche, il faut que dans le '' | ||
| Ligne 13: | Ligne 15: | ||
| < | < | ||
| </ | </ | ||
| + | |||
| + | ===Possibilité 2=== | ||
| + | Le schéma n'est pas le bon. | ||
| + | |||
| + | Il faut afficher '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Et ajouter en déclaration de la classe le nom du schéma | ||
| + | <code java> | ||
| + | @Entity | ||
| + | @Table(schema = " | ||
| + | public class Position { | ||
| + | </ | ||
| + | |||
| + | ====The value for annotation attribute SecondaryTable.pkJoinColumns must be some @javax.persistence.PrimaryKeyJoinColumn annotation==== | ||
| + | <code java> | ||
| + | @SecondaryTables({ | ||
| + | @SecondaryTable(name=" | ||
| + | @SecondaryTable(name=" | ||
| + | }) | ||
| + | </ | ||
| + | |||
| + | Il manque | ||
| + | <code java> | ||
| + | import javax.persistence.PrimaryKeyJoinColumn; | ||
| + | </ | ||
| + | |||
| + | ====@OneToOne or @ManyToOne on XXX references an unknown entity: YYY==== | ||
| + | Hibernate : | ||
| + | |||
| + | Caused by: org.hibernate.AnnotationException: | ||
| + | at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java: | ||
| + | |||
| + | La classe YYY n'est pas dans le fichier '' | ||
| + | <code xml> | ||
| + | < | ||
| + | < | ||
| + | <mapping class=" | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ====Caused by: java.sql.SQLException: | ||
| + | |||
| + | org.hibernate.exception.GenericJDBCException: | ||
| + | at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java: | ||
| + | at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java: | ||
| + | at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java: | ||
| + | at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java: | ||
| + | Caused by: java.sql.SQLException: | ||
| + | at com.mysql.jdbc.SQLError.createSQLException(SQLError.java: | ||
| + | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java: | ||
| + | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java: | ||
| + | at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java: | ||
| + | |||
| + | Le champ '' | ||
ide/eclipse/jpa.1483058836.txt.gz · Dernière modification : de root
