interesting issues in the forum
by Sanne Grinovero
hi Hardy,
I've been browsing the forums today and found these topics of interest,
they could be quite important bugs we should fix:
not working correctly with Spring (needs some test, I don't trust this
report 100%)
http://forum.hibernate.org/viewtopic.php?t=988828
memory leak on redeploy (quite good information here, but this is
going to be hard)
http://forum.hibernate.org/viewtopic.php?p=2400319
sort + scrollableresult appears to load all in memory (never happened
to me, needs a test)
http://forum.hibernate.org/viewtopic.php?t=992342
I never used Spring, so can't help there.
I have no idea about how to solve the ThreadLocal problem: this has to do with
how Hibernate registers eventlisteners and we probably should ask for
changes there
Nnot sure if we can change the EM listeners without changing the spec??
I'm absolutely no expert on other Hibernate modules.
I could try to reproduce the scrollableresult problem, but not this week.
16 years, 1 month
HHH-3627 - Should concat convert parameters to string?
by Juraci Costa
All,
I don't know if this was discussed before (I didn't find it in the list's archives), but if so, I'm probably missing something basic here :-)
I came across this issue, and I don't know whether this should be changed or not. The problem is that the guy is trying to use the concat function with numeric literals. Hibernate not only accepts these values, but sends them "as is" to the RDBMS's, causing an error for MSSQL when mixing the types, or causing unexpected behaviour when using only numeric types
s.createQuery( "from Human h where h.nickName = concat(1,2)" ).list();
s.createQuery( "from Human h where h.nickName = concat(1,2,'c')" ).list();
Results in:
human0_.nickName=(
1+2 // becomes "3", instead of 12
)
and
human0_.nickName=(
1+2+'c' // error in MSSQL
)
I realize that the numeric parameters needs a cast to behave correctly, but I'm wondering if this cast should be in Hibernate or in the user's code. There are some arguments for both sides.
In Hibernate because:
- The HQL should be the same for as many RDBMS's as possible (that's one of the benefits of having a specific query language, right?). If Hibernate accepts integer parameters for "string concatenation"[1], it should do what is expected (concatenate strings)
- Both the concat and the || operator are clearly supposed to act on character types, but the MSSQL operator (+) can be used in both numeric and character types, with different purposes (arithmetic for numbers, concatenation for character). As Hibernate was asked to "concatenate", it should make this intention clear to the underlying RDBMS. In this case, by converting the values to character types. There is no such problems in other RDBMSs, as they have specific operators (||) or functions (concat) to this purpose.
- org.hibernate.dialect.function.DerbyConcatFunction seems a good precedent for such specific things :-)
In the Application because:
- As the RDBMS can accept other values than the "default string" type (varchar), the app developer should explicitly cast to the desired type, if this format is not a character type.
[1] http://www.hibernate.org/hib_docs/reference/en/html/queryhql-expressions....
So, should concat convert parameters to string?
- Juca.
16 years, 1 month
Which branches should receive patches
by Juraci Costa
All,
I'm about to making some patches to fix tests which uses table/column names which are keywords for some RDBMS's. So, which branches should I target to, when making such patches?
My initial list (for trunk, but similar ones for ANN/EM):
trunk
Branch_3_2
Branch_3_2_4_SP1_CP
Should I include Branch_3_3, if applicable? Regarding Branch_3_3, I noticed it doesn't contains ANN/EM, and ANN/EM doesn't have a Branch_3_3. So, where should I take ANN/EM from, if building core from Branch_3_3 ?
- Juca.
16 years, 1 month
Anyone having problems in "tutorials" module?
by Juraci Costa
All,
Hudson jobs for trunk are failing due to a dependency missing:
Path to dependency:
1) org.hibernate:hibernate-tutorials:pom:3.4.0-SNAPSHOT
2) org.slf4j:jcl-over-slf4j:jar:1.4.2
I got this error on my local setup too, when building the tutorials module. I changed the pom.xml to use jcl-over-slf4j version 1.5.2 instead of 1.4.2, and it is working again. It seems that the version 1.4.2 doesn't exists anymore in maven repository:
http://repo1.maven.org/maven2/org/slf4j/jcl-over-slf4j/
Am I the only one who faced this? Is changing this version the way to go? If so, I can open a JIRA for it and commit my changes.
- Juca.
16 years, 1 month