• Post Reply Bookmark Topic Watch Topic
  • New Topic

Called stored procedure inserts data to wrong columns  RSS feed

 
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 "?"?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!