Announcement Announcement Module
No announcement yet.
Stored procedures and Spring Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stored procedures and Spring

    I am working on a Spring app where we will have to do database updates in stored procedures and we are planning to use the StoredProcedure class. My question is what are the best practise recommendations if we need to persist potentially complex objects with stored procedures.If anyone is currently doing this, or anyone has general thoughts on this input would be much appreciated.

  • #2
    When I create StoredProcedure subclasses, I tend to create a custom execute method which takes the complex object and translate it to a map.

    I don't make StoredProcedure objects as top level classes. I tend to implement them as static class inside my DAO and initialize them inside of the initDao method (if you are using the JdbcDaoSupport convenience class)