type « SQL « JPA Q&A





1. CIDR as sql-type in hibernate    coderanch.com

2. java.sql.SQLException: operation not allowed: streams type c    forum.hibernate.org

Using Hibernate + Spring + Oracle8 + 10g JDBC Driver org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not insert: [com.csa.lta.services.reports.persistent.ReportParmMO#1162]: encountered SQLException [operation not allowed: streams type cannot be used in batching]; nested exception is java.sql.SQLException: operation not allowed: streams type cannot be used in batching java.sql.SQLException: operation not allowed: streams type cannot be used in batching at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java(Compiled Code)) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211) at oracle.jdbc.driver.OraclePreparedStatement.addBatch(OraclePreparedStatement.java:2833) ...

3. Could not determine type for: java.sql.SQLXML Error    forum.hibernate.org

Hello everybody, I'm running my application using jboss6 and a DB2 database. I've defined a java.sql.SQLXML attribute in my domain class. This attribute maps to a XML column type in the DB2 database (V9.7). Everthing runs under JDK 1.6. The problems is that I get the following exception from hibernate: Caused by: org.hibernate.MappingException: Could not determine type for: java.sql.SQLXML, at table: ...

4. Logging SQL parameters from a user type    forum.hibernate.org

Hi, I implemented a user type and noticed the SQL parameters of this type are not logged when SQL parameter logging is enabled (...). How can I log the parameters from my user type so that their logging conforms to the format and log4j configuration of the built-in types? Is there a global logging class or method in hibernate ...

5. Diference between type="text" and sql-type="t    forum.hibernate.org

It does the same on MS SQL Server and Oracle 9i. According to what I can see, Hibernate treats the TEXT types as CLOBS. Unfortunately, JDBC drivers seems to always return a fixed amount of bytes, padded with \0. But the TextType implementation doesn't check for this end-of-string marker... Just wondering if it is on purpose or if Gavin thought the ...

6. sql-type errors when moving from 2.0.3 to 2.1.1    forum.hibernate.org

Hi forum :) I decided to move an application I make from version 2.0.3 to version 2.1.1 I started getting MappingException: duplicate import, on almost all my mapping files. After some searching I found that I -could not use sql-type attribute in a property that is inside a subclass. In a property outside the subclass it's fine. -could not use sql-type ...

7. sql-type="text" doesn't work    forum.hibernate.org

8. how to get the next SQL SERIAL type value?    forum.hibernate.org

Hi, I have a column in my table with serial type. the problem is, that I need an id for my object and operate with this id BEFORE the object is saved. However, the hibernate assigns an id AFTER the object is saved. so I have sommething like this: TABLE mytable ( userid SERIAL ) and my object class User { ...

9. the Serial sql type    forum.hibernate.org

how to do this class SomeClass { Integer Object object1; private Collection collection; } all objects in collection can be persisted with hibernate. all objects in collection have an id property, which refers to object1's id. I need to save both object1 and collection; the problem is: how to should I tell to hibernate, to assign an id to object1, so ...





10. Convert Hibernate Types to SQL Types    forum.hibernate.org

12. UserTypes that are NOT java.sql.Types    forum.hibernate.org

Hello, I have minor problems with my UserTypes. The db types I want to map to are Postgres: box, path, point types which are not in: java.sql.Types. However in the UserType I have to define the method: public int[] sqlTypes(){ return new int[] { Types.OTHER}; } I decided to return OTHER since I did not know what else to do. Other ...

14. sql type conversion -- real to double precision    forum.hibernate.org

15. Native SQL and custom user type    forum.hibernate.org

We created a custom user type to handle Time Stamp with Time Zone data type in Oracle 10g. Whenever we use this for HQL everything works fine. However when I try to do a native sql query hibernate seems to trip up on the Time stamp time zone again. Is there is somthing special you have to do to use custom ...