util « Field « JPA Q&A





1. util.JDBCExceptionReporter Field 'ID' doesn't have a    forum.hibernate.org

javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not insert: at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:637) at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:244) ... Caused by: java.sql.SQLException: Field 'ID' doesn't have a default value at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571) at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1124) at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:676) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1166) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1082) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1067) ...

2. Can not set Long field foo.id to java.util.LinkedHashSet    forum.hibernate.org

Author Message ractive Post subject: Can not set Long field foo.id to java.util.LinkedHashSet Posted: Thu Mar 04, 2010 5:09 am Newbie Joined: Thu Mar 04, 2010 4:46 am Posts: 3 Hello everyone I'm having two classes/entities Device and Kpi. There is a @ManyToMany relation between those two, so a Device can have many Kpis and a Kpi can belong ...

3. Date and Time fields to a single util.Date field?    forum.hibernate.org

Newbie Joined: Sun Jan 18, 2004 9:52 am Posts: 11 Hi Myk, Thanks for the pointers. I followed this process and came up with the following CompositeType to achieve this goal - figure it might be useful for someone else - Code: package dao.hibernate; import java.io.Serializable; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; import java.util.Calendar; import net.sf.hibernate.CompositeUserType; import net.sf.hibernate.Hibernate; import ...

4. Can not set javassist.util.proxy.MethodHandler field    forum.hibernate.org

Hello. I found several posts and bugs on the subject of javassist proxy but did not find anything resolving my issues... let me explain: 1) I have several pojos with annotation mapping. 2) Some of the fields are marked with lazy loading. Mainly, lookups such as AddressType, or similar. 3) I'm using GraniteDS to communicate with the Flex UI. When the ...