Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #28219 > unrolled thread
| Started by | getdgbmail@gmail.com |
|---|---|
| First post | 2014-04-24 12:07 -0700 |
| Last post | 2014-04-25 10:44 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.java.programmer
Hibernate query - field length, pulling wrong record getdgbmail@gmail.com - 2014-04-24 12:07 -0700
Re: Hibernate query - field length, pulling wrong record Josip Almasi <joe@vrspace.org> - 2014-04-25 10:44 +0200
| From | getdgbmail@gmail.com |
|---|---|
| Date | 2014-04-24 12:07 -0700 |
| Subject | Hibernate query - field length, pulling wrong record |
| Message-ID | <ea386973-8a1f-416d-a816-0b0b88f43196@googlegroups.com> |
I am using a Hibernate query in JAVA to retrieve data from an iSeries file. The field length of fieldName in my query WHERE clause is 4 long. There is a record in the file with a field name of BLUE. When I run the query using BLUE_GREEN, this record is selected. BLUE_GREEN is not BLUE, so I don't want this field to be selected. Why is this happening? WHERE fieldName = :fieldName
[toc] | [next] | [standalone]
| From | Josip Almasi <joe@vrspace.org> |
|---|---|
| Date | 2014-04-25 10:44 +0200 |
| Message-ID | <ljd7a0$dei$1@gregory.bnet.hr> |
| In reply to | #28219 |
On 04/24/2014 09:07 PM, getdgbmail@gmail.com wrote: > I am using a Hibernate query in JAVA to retrieve data from an iSeries file. > The field length of fieldName in my query WHERE clause is 4 long. There is a > record in the file with a field name of BLUE. When I run the query using > BLUE_GREEN, this record is selected. BLUE_GREEN is not BLUE, so I don't want > this field to be selected. Why is this happening? > > > > WHERE > fieldName = :fieldName > AFAIK hibernate does not truncate strings to field lengths. It may be doing of either jdbc driver or database. Guess you should start by googling 'iseries jdbc truncate':) Regards...
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web