我在包上下文中有plsql代码:
type t_demand_for_excel_upload is record
(
bsns_oper_name t_string,
demand_date date,
demand_hour integer,
demand_value number
);
type t_cur_demands_for_excel_upload is ref cursor return t_demand_for_excel_upload;
procedure get_demands_for_excel_upload
(
p_calc_version_id in integer,
p_shop_id in integer,
p_start_date in date,
p_end_date in date,
p_result out t_cur_demands_for_excel_upload
);Jooq版本:
<jooq.groupId>org.jooq.pro</jooq.groupId>
<jooq.version>3.12.3</jooq.version>
<jooq.generator.db.dialect>org.jooq.meta.oracle.OracleDatabase</jooq.generator.db.dialect>当我使用oracle 12c生成代码时,它在java中看起来像这样:
public static Result<Record> getDemandsForExcelUpload(Configuration configuration, BigInteger pCalcVersionId, BigInteger pShopId, LocalDate pStartDate, LocalDate pEndDate) {
GetDemandsForExcelUpload f = new GetDemandsForExcelUpload();
f.setPCalcVersionId(pCalcVersionId);
f.setPShopId(pShopId);
f.setPStartDate(pStartDate);
f.setPEndDate(pEndDate);
f.execute(configuration);
return f.getReturnValue();
}和我预期的一样,使用Result<Record>。
在maven中调试:

在oracle 19c上,生成的代码如下所示:
public static TDemandForExcelUploadRecord getDemandsForExcelUpload(Configuration configuration, BigInteger pCalcVersionId, BigInteger pShopId, LocalDate pStartDate, LocalDate pEndDate) {
GetDemandsForExcelUpload f = new GetDemandsForExcelUpload();
f.setPCalcVersionId(pCalcVersionId);
f.setPShopId(pShopId);
f.setPStartDate(pStartDate);
f.setPEndDate(pEndDate);
f.execute(configuration);
return f.getReturnValue();
}
public class TDemandForExcelUploadRecord extends UDTRecordImpl<TDemandForExcelUploadRecord> implements Record4<String, LocalDate, BigInteger, BigDecimal> { ...我的光标在哪里?请帮帮忙。
Maven debug for oracle 19c:

在这两种情况下,jooq设置是相同的
发布于 2021-03-24 23:59:39
这似乎是jOOQ 3.14中的一个错误,或者更确切地说,是一个缺失的功能。我们没有对强类型REF CURSOR类型进行任何集成测试,所以我们没有注意到这种回归。为此,我创建了两个问题:
在3.15.0和3.14.9版本实现该功能请求之前,添加对类型化的types
REF CURSOR的支持的功能请求将恢复为旧行为。如果您需要早期修补程序版本中的修补程序,请通过商业支持渠道联系。https://stackoverflow.com/questions/66636795
复制相似问题