long « Data Type « JPA Q&A





1. JPA: How do I get a scalar result of type Long-- not BigNumber-- from Oracle NUMBER?    stackoverflow.com

The default mapping from an Oracle NUMBER value is into BigNumber... How can I get a scalar result query to return a Long instead?

2. JPA, Mysql Blob returns data too long    stackoverflow.com

I've got some byte[] fields in my entities, e.g.:

@Entity
public class ServicePicture implements Serializable {
    private static final long serialVersionUID = 2877629751219730559L;
    // seam-gen attributes (you ...

3. Why has Hibernate switched to use LONG over CLOB?    stackoverflow.com

It looks like that Hibernate started using LONG data type in version 3.5.5 (we upgraded from 3.2.7) instead of CLOB for the property of type="text". This is causing problems as LONG data ...

4. insert sql consumes long time in Hibernate    stackoverflow.com

In my application I have two table, Group and Role, that are related between them with a @ManyToMany relationsheep. Since each Group can have many Roles and each Role can have ...

5. hibernate returning BigDecimal datatype instead of long    stackoverflow.com

The hibernate named query returns a BigDecimal for a column that has datatype NUMBER.

select col1 as "col1" from table1 union select col2 as "col1" from table2
On client side, I expect ...

6. Hibernate with JBoss long startup time    coderanch.com

Hey, I am working with jboss 4.2 and hibernate as a JPA provider. I have 1 persistence unit im my ear that sacn for entites in 4 jars. its take a long time to start the server because hibernate , can you please advice? Attach snapshot from the log where you can see intervals between each phase: 22:12:18,559 INFO [PersistenceUnitDeployment] Starting ...

7. Data too long error - Blob Type    forum.hibernate.org

Hello, I am trying to map blob type in MySQL using Hibernate 3.0. I am getting error as Data Too long for the specified column. I tried to specify length as 1000000000 but still I am getting the same error. Below is my mapping file: ...

8. MySQL mediumtext and long strings...    forum.hibernate.org

9. Long cast to int    forum.hibernate.org

Pro Joined: Mon Apr 16, 2007 8:10 am Posts: 213 Hello, I have a puzzling message from Hibernate. On a findBy method it tries to use a Long instead of an integer. I didn't specify any Long in the domain class, nor in the mapping, nor in the test.. Any clue ? Thanks Stephane Code: Hibernate: insert ...





11. what type should I use ? long Binary ??    forum.hibernate.org

It depends upon the JDBC types that MySQL maps those DB type to. To check this, obtain a jdbc connection and do the following connection.getMetaData().getTypeInfo() This will return you a ResultSet where each row describes a SQL type in the underlying database. One of the columns in this result set is named "DATA_TYPE", which is the same value as the type's ...

12. UnsupportedOperationException after long idle time    forum.hibernate.org

Hi i'm useing hibernate version 2 in a webapp runbning in Tomcat on FreeBSD. After a long idle time of the app. (24 hours) I get java.lang.UnsupportedOperationException: The user must supply a JDBC connection java.lang.UnsupportedOperationException: The user must supply a JDBC connection at net.sf.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:32) at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:262) at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3155) at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3138) at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:61) at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:699) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:180) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:128) at net.sf.hibernate.loader.Loader.list(Loader.java:918) at ...

13. Oracle Long datatype and EntityPersister    forum.hibernate.org

Hibernate version: 2.1 Name and version of the database you are using:Oracle 9i I've come across a problem with using Oracle SQL Long type and Hibernate. The Oracle schema is using a depricated Long type (2Gig ASCII), we are unable to convert this to a LOB due to pl/sql dependencies. I am trying to create a Hibernate type and EntityPersister to ...

14. Problems using Hibernate with Oracle and LONG RAW data type    forum.hibernate.org

Newbie Joined: Mon Feb 28, 2005 6:47 am Posts: 4 Location: Norway We're using Hibernate on a legacy database, using the LONG RAW datatype to store some binary data. It has two entities with bidirectional associations: Document and Revision (a document has many revisions). The Revision entity has the LONG RAW data column, which eventually becomes a byte-array in the corresponding ...

15. Long strings and Ingres    forum.hibernate.org

Newbie Joined: Tue May 24, 2005 6:51 am Posts: 5 Hi there, I have a table on Ingress that has a column of type varchar(30000) and I'm trying to put a java String in there. I get an error stating that I cannot insert a value of type "long varchar" into a column of type "varchar". Any suggestions on how to ...

16. MSSQL error with long string    forum.hibernate.org

Caused by: java.sql.SQLException: Disallowed implicit conversion from data type ntext to data type varchar, table 'portletsDevDave.uportal_dev_dave_app.tblCAMP_eventreservation_Request', column 'additionalDetails'. Use the CONVERT function to run this query. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628) at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:525) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:421) ...





17. problems with oracle long and clob    forum.hibernate.org

WARN 15:11:06 StatementUtils.attemptClose:48 - Statement close FAILED. java.sql.SQLException: Io exception: Bad packet type at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255) at oracle.jdbc.driver.OracleStatement.freeLine(OracleStatement.java:3482) ...

18. Long startup time after update 3.1 -> 3.2    forum.hibernate.org

Hi everybody, I'm having a strange phenomenon after updating from 3.1 to 3.2. In my scenario I'm mapping about 150 classes via Hibernate Annotations. Using 3.1 the SessionFactory creation startup time is about 5sec but after updating to 3.2 it takes almost several minutes. After taking a look into the logging output it seems that the delay is caused by introspecting ...

19. IdentifierGeneratorFactory cannot be cast to java.lang.Long    forum.hibernate.org

Hi there I really don't understand what's going on, or what to do. identity seems to be the only valid generator, and It seems it gives back a Serializable object. When I use type="serializable" I can't create the table because it tries to create a tinyblog with auto_increment. any ideas ? Thank you ! Hibernate version:3.2.0.ga Mapping documents: @OneToMany(cascade = CascadeType.ALL) ...

20. java.lang.Double cannot be cast to java.lang.Long    forum.hibernate.org

I'm executing a HQL query that return an Object, that I will cast to Double, inside that query i pass Double named parameters, and I use some hql function that probably returns integers, such as count(...). I do an aritmetic computation, + / * I expect that since some of the values are Double, also Long are converted to Long.. but ...

21. Hibernate takes very long time to execute delete statement    forum.hibernate.org

Hello, I 'm using hibernate 2 together with Spring 2 to develop a web application. I'm trying to delete and object but hibernate take a very long time to execute the delete statement and at the end nothing is deleted from the database. I can see the delete statement in hibernate logs but nothing is deleted. It even doesn't rollback. Can ...

22. DetachedCriteria.ForClass(Clasa) takes very long time    forum.hibernate.org

Hi, I am not very experienced with Hibernate, and I am perplexed by the two usuages listed below: The first won't return the data for about 10 minutes, while the second returns instantly. Both are using the same object Class JmIm.class, and the underlying table has only 120 rows of data. Another strange thing is: when I use the first method, ...