Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with onetomany relantionship with JPA 2.0

 
Diego Armando Zarate Diaz
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody, i have a problem with a onetomany relationship, i have a elementostvpaga that can have many canales and a canales class tha can have many elementostvpaga, when in mi view i tried to visualize it i get an error i put my classes and the log with the error, thks.








and the error log, cheers!

GRAVE: Fallo al ejecutar SELECT IdCanal, IdProductosTelecom, T_canales.Nombre from Paquetecanal left join Canales T_canales on Paquetecanal.IdCanal = T_canales.IdCanal WHERE Paquetecanal.IdProductosTelecom = ?

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'IdCanal' in field list is ambiguous at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2643) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at org.openxava.tab.impl.JDBCTabProvider.nextBlock(JDBCTabProvider.java:235) at org.openxava.tab.impl.JDBCTabProvider.nextChunk(JDBCTabProvider.java:258) at org.openxava.tab.impl.EntityTabDataProvider.nextChunk(EntityTabDataProvider.java:35) at org.openxava.tab.impl.EntityTab.nextChunk(EntityTab.java:298) at org.openxava.tab.impl.TableModelBean.getRow(TableModelBean.java:120) at org.openxava.tab.impl.TableModelBean.getValueAt(TableModelBean.java:171) at org.openxava.tab.impl.XTableModelDecoratorBase.getValueAt(XTableModelDecoratorBase.java:63) at org.openxava.tab.impl.HiddenXTableModel.getValueAt(HiddenXTableModel.java:70) at
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, please don't duplicate post the same question. Although I like the CODE tags look here in this thread, so i am going to close the other one, but look at my last reply and reply to that here.

Thanks

Mark
 
Diego Armando Zarate Diaz
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, i read your response at the another post, i post again for the information was cleareast, sorry for the inconvenients. And thks for your time.

Cheers!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic