1. Design decision, use bit field or char? forum.hibernate.orgHibernate version: 2.1.7 Name and version of the database you are using: MySQL 4.1 and MS SQL Server 2000. Hi, I'm designing storage for 30 checkboxes in the GUI and I don't know what datatype to use. There will be lots of records (1.000.000+) and I must be able to query on individual checkboxes. I have been thinking of three alternatives. ... |
2. Padding spaces using Oracle CHAR field forum.hibernate.orgHi - I'm using Oracle 10g, Hibernate 2.1 and Spring framework 1.15, and have a currency table with a currency column of CHAR(3). My mapping file maps this field as a String, length 3. |
3. Hibernate and CHAR fields in primary keys forum.hibernate.orgI have an issue dealing with Hibernate and Oracle tables that have CHAR fields that participate in the primary key of these tables. Specifically, we are tired of having to pad our objects' (char) instance variable values before we let hibernate retrieve and or update a row that has a CHAR in the primary key. Yes, I agree, CHAR fields have ... |
4. Problem creating object with unicode char (field too long) forum.hibernate.orgNeed help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.2.1GA Mapping documents: Code between sessionFactory.openSession() and session.close(): Full stack trace of any exception that occurs: MysqlDataTruncation: Data truncation: Data too long for column 'title' at row 1 Stack: com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2973) com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600) com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1129) com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:681) com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1368) com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1283) com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1268) org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2200) org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2590) org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48) org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248) org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290) org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:180) org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:108) org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131) org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87) org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38) org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618) org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592) org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596) ... |
5. Hibernate SQLQuery truncating UDT char field in SQL Server forum.hibernate.orgHi, I'm creating a SQLQuery and am passing it a very simple T-SQL statement to run but it is truncating a user defined data type (with 12 chars) so that only the first character is being retrieved in the Object[] returned from the SQLQuery list() call. For example, if 12345 should be coming back from the database, only the first 1 ... |