- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38.8k
Closed
Labels
has: votes-jiraIssues migrated from JIRA with more than 10 votes at the time of importIssues migrated from JIRA with more than 10 votes at the time of importin: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)status: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning processAn outdated, unresolved issue that's closed in bulk as part of a cleaning process
Description
toddmcgrath opened SPR-3510 and commented
Extending StoredProcedure is working great.
public SampleStoredProcedure(DataSource dataSource, String sprocName) {
    super(dataSource, sprocName);
    declareParameter(new SqlReturnResultSet("rs", new EventMapper()));
    declareParameter(new SqlParameter("EventTitle", Types.VARCHAR));
    declareParameter(new SqlParameter("EventType", Types.VARCHAR));
    declareParameter(new SqlParameter("StartDate", Types.DATE));
    declareParameter(new SqlParameter("EndDate", Types.DATE));
    declareParameter(new SqlParameter("Location", Types.VARCHAR));
    declareParameter(new SqlParameter("MinPrice", Types.INTEGER));
    declareParameter(new SqlParameter("MaxPrice", Types.INTEGER));
    compile();
}
There are times when I don't want to supply a MinPrice, MaxPrice values and use the defaults I've set in the sproc. But, I can't figure out how to avoid having to set every parameter declared. Know what I mean? Example- if I set 5 of the parameters in the map, I receive an exception about requiring 7 inputs.
Forum Reference: http://forum.springframework.org/showthread.php?t=39086
Issue Links:
- Support for named parameters in SimpleJdbcCall[SPR-12801] #17398 Support for named parameters in SimpleJdbcCall
- Support named parameters in CallableStatementCreator implementation [SPR-4406] #9084 Support named parameters in CallableStatementCreator implementation
12 votes, 8 watchers
Metadata
Metadata
Assignees
Labels
has: votes-jiraIssues migrated from JIRA with more than 10 votes at the time of importIssues migrated from JIRA with more than 10 votes at the time of importin: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)status: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning processAn outdated, unresolved issue that's closed in bulk as part of a cleaning process