June 01, 2005

Doh! Read the docs!

Follow-up to Weird "problem" with hibernate composite–elements from Colin's blog

So the problem is that in hibernate the "index" mapping refers to the absolute index in the List, so if the values for the index column are 0,1,2,5
then your List will have 5 elements, and the 3rd and 4th elements will be null.

I wrongly assumed (yeah yeah, ass out of u and me) that the index was the value used to order the elements :(

Because the existing data is just so bad, I ended up mapping it as a Set and specifying the order-by clause to be the relevant column.

- No comments Not publicly viewable

Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

June 2005

Mo Tu We Th Fr Sa Su
May |  Today  | Jul
      1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30         

Search this blog



Most recent comments

  • Interesting… While I'm not completely convinced in such microbenchmarks, I'm pretty sure that 1ms … by Alexander Snaps on this entry
  • Hello. I bought the book yesterday. I was trying to find the source code for chapter 11 and chapter … by Suleman on this entry
  • http://woosight.net/account/login?username=demo by live mashup demo on this entry
  • Thanks mate ….. This blog was really helpful. by Maaz Hurzuk on this entry
  • Ty. Not directly helpful for my problem, but pointed me in the right direction. You will also get th… by Mike E. on this entry

Blog archive

Not signed in
Sign in

Powered by BlogBuilder