This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Called stored procedure inserts data to wrong columns

 
Piotrek Tempes
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Let me be concise. Here's some code:



and UTest:



and problem...
The procedure inserts vars into wrong columns (Because in case of stored procedures calling annotation @column doesn't work). After debugging it a bit I sorted out that hibernate makes a table(named fields) and fills it with fields form passed object. Fields form object are sorted in alphabetical order, and arguments in procedure are not. When procedure is called the arguments are passed in order from fields[] table... and that's how I am stucked. Anybody knows how to define the order of passed aprameters? Or maybe there's a way to pass named parameters instead of "?"?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic