1. Beautify Integer values for comparing as strings stackoverflow.comFor some reason I need to enter my integer values to database as string, then I want to run a query on them and compare those integers as strings. Is there ... |
2. Error handling String to Integer and inserting empty values in database stackoverflow.comI am new to Java and I am creating an application in JSF and Hibernate. I have a form which has several input fields but only one field that will be ... |
3. How to differentiate between 0 and null in an INT column in MySQL stackoverflow.comIf there is a null value stored in a MySQL INT column, it will return 0 when accessed by technoligies like JPA. If 0 value also stored in the column, how ... |
4. Integer array operations using Hibernate coderanch.comhi I have int[] field in my postgresql database which holds some ids. Changing it to separate table wouldn't be a good choice as it would became very big in short time. I need to stay with this solution then. However I cannot read/write this field using entity manager, as there is not proper mapping for this type. Temporary I changed ... |
5. Cast Hexadecimal string to Integer forum.hibernate.orgHello, I am trying to convert a hexadecimal string to a number for a where clause in HQL. I tried: "from Table tb where cast(tb.hexstringcolumn as int) between 100 and 1000" ....... This works if tb.hexstringcolumn is a numeric string (e.g. 10). It will not work if tb.hexstringcolumn = FF. Any thoughts? First post, so please be gentle (I read the ... |
6. Change boolean type to integer type forum.hibernate.org |
7. 2-dimensional array of int forum.hibernate.org |
8. Strategy with PersistentEnums of Strings (instead of ints)? forum.hibernate.orgHello, First off, congrats on the new forum. It's much nicer than the old SF one. I am working on mapping an existing DB to hibernate. There is a perfect candidate for a PersistentEnum, except it is a collection of Strings instead of ints. How do people deal with this situation? By just creating a custom type, or just not bothering ... |
9. int/string conversion on pk forum.hibernate.orgHi, I'm sorry if this has been answered before. I looked around the forums and the docs and could find a definite answer. all of my tables have numeric primary keys (MySql, auto_increment), but when I pull them into my data model objects, I want to deal with them as string objects. Do I have to make use of UserType for ... |
10. PropertyAccessException getting null for an int-property forum.hibernate.org |
11. Integer columns return null forum.hibernate.orgPage 1 of 1 [ 1 post ] Previous topic | Next topic Author Message sbmahs Post subject: Integer columns return null Posted: Mon May 30, 2005 7:27 am Newbie Joined: Tue May 24, 2005 6:51 am Posts: 5 Hi all, I'm having some trouble with Integer columns in related objects. ... |
12. Casting a text field to int in native sql forum.hibernate.orgNeed help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp [b]Hibernate version:3.0[/b] [b]Mapping documents:[/b] [b]Code between sessionFactory.openSession() and session.close():[/b] [b]Full stack trace of any exception that occurs: org.hibernate.exception.GenericJDBCException: could not execute query at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:1518) at org.hibernate.loader.Loader.list(Loader.java:1498) at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:103) at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1340) at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:151) at com.gloptv.smsc.PhoneNumber.getResult(Unknown Source) at org.apache.jsp.vote_jsp._jspService(vote_jsp.java:419) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) ... |
13. How to insert null into database when int value is 0 forum.hibernate.orgI'm sorry, maybe I wasn't clear. Since the property is stored as an int, it is 0 by default. I want to continue to store the value as an int, but I want Hibernate to recognize that the value of 0 means that the property hasn't been set (to a non 0 value). Thanks. |
14. elt INTEGER not null forum.hibernate.orgHi all, I am looking for a solution for the following problem (found at http://sourceforge.net/mailarchive/foru ... nth=200402 ). Can anybody helb? Thanx, Thomas --------- schnipp --------------- I"m putting together an example demo for some students (like I"m the expert :-\) and I"m using XDoclet, Tomcat, and MySQL for it all. Person, abstract class extended by (joined-subclass) Teacher and Student, with just ... |
15. using Blob, SQLException Bad Integer when gets data, save OK forum.hibernate.orgMessage message = new Message(); File file = new File("jude.ico"); InputStream in = null; byte[] tmp = new byte[512]; ByteArrayOutputStream out = null; try { ... |
16. how to max() on a cast (String as integer) forum.hibernate.orgException in thread "main" java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.AggregateNode \-[AGGREGATE] AggregateNode: 'max' \-[METHOD_CALL] MethodNode: '(' +-[METHOD_NAME] IdentNode: 'cast' {originalText=cast} \-[EXPR_LIST] SqlNode: 'exprList' +-[DOT] DotNode: 'onlheain0_.DOCNUM' {propertyName=Docnum,dereferenceType=4,propertyPath=Id.Docnum,path=hin.Id.Docnum,tableAlias=onlheain0_,className=br.seal.hibernate.vo.OnlHeaIn,classAlias=hin} | +-[DOT] DotNode: 'onlheain0_.DOCNUM' {propertyName=Docnum,dereferenceType=2,propertyPath=Id.Docnum,path=hin.Id,tableAlias=onlheain0_,className=br.seal.hibernate.vo.OnlHeaIn,classAlias=hin} | | +-[ALIAS_REF] IdentNode: '(onlheain0_.FILENAME, onlheain0_.DOCNUM, onlheain0_.STAT, onlheain0_.LAGER)' {alias=hin, className=br.seal.hibernate.vo.OnlHeaIn, tableAlias=onlheain0_} | | \-[IDENT] IdentNode: 'Id' {originalText=Id} | \-[IDENT] IdentNode: 'Docnum' {originalText=Docnum} \-[IDENT] IdentNode: 'integer' {originalText=integer} |
17. Table doesn't get created for classes with boolean or int forum.hibernate.orgWhen my Pojos contain boolean or int variables a table for it doesn't get created. the other variables that are String and Long get created fine. What am I doing wrong here? class Group { Long id; String label; bool initiallyVisible; } Hibernate Mapping Group.hbm.xml |
18. Send NULL value when int property is 0. forum.hibernate.org |
19. sqlquery.setParameter(int, object) can not guess java string forum.hibernate.orgDB: Oracle 9i A simple sqlquery is created as following: |
20. How to store a DB Integer as Java Date?? forum.hibernate.orgThe database I am connecting to, stores their dates as Integers in the format: 20060523 (yyyyMMdd). I would like to be able to store these fields as java.util.Date objects within my persistence objects. In this application I am only using hibernate to read from the database (never to write to). The conversion is easy to code with: new SimpleDateFormat("yyyyMMdd").parse(integerDate.toString()) I tried ... |
21. does Hibernate support boolean to integer conversion? forum.hibernate.orgHi, I have a Java class that has some boolean fields and they are mapped as integers in PostgreSQL. Now when I try to read records from the DB using Hibernate, it does the automatic conversion from integer to boolean. But when I try to insert the record, I get following error:: Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execute JDBC ... |
22. Boolean to int save to sybase forum.hibernate.orgHi, I am trying to save java.lang.Boolean to int datatype in sybase which is nullable using hibernate. if the Boolean object is null hibernate converts to 0 and save is it. Is there any way to make Boolean object null save as null to db? I will agree if it hibernate handle this way for primitive data type boolean, But for ... |
23. Error when updating column of type int with null forum.hibernate.org |
24. comma delimited string of values to IList |
25. String to int conversion with aggregate forum.hibernate.org |
26. Does Hibernate support unsigned integer data types? forum.hibernate.org |
27. Assign null for a property with data type int forum.hibernate.orgHibernate version:3 I have a property called Count . I want to save anything that i get from the customer. So we are saving the properties in the database by having 2 fields called original Count and Count. Original Count contains the data that the customer sent in the form of a string. Count contains the data converted into integer format. ... |
28. How to max() on a cast (String as integer) forum.hibernate.orgI want to be able to take the max of a column and add one to it but it returns as a string and has to be cast as an integer. However, this query: SELECT max(cast(stn.id,integer)) FROM Object Stn doesn't work and only gives me an error telling me the query couldn't be executed. What's the correct way of selecting the ... |