【发布时间】:2021-08-31 12:34:45
【问题描述】:
我正在运行一个 jpa 查询,我将所有值定义为 varchar,但是当我在 sql server 中检查正在运行的查询时,它显示为 nvarchar,谁能解释一下。
JPA QUERY : List findByBatchNameAndFilenameAndIngestionStatusAndVendorName(String batchName, String filename, int status, String vendorName);
Sql Server 查询: RPC:Starting exec sp_executesql N'select ingestdocs0_.ID as ID1_0_, ingestdocs0_.BATCH_NAME as BATCH_NA2_0_, ingestdocs0_.BRAND as BRAND3_0_, ingestdocs0_.COMMENTS as COMMENTS4_0_, ingestdocs0_.Doc_Type_Code as Doc_Type5_0_, ingestdocs0_.CONTENT_FILE_ ,ingestdocs0_.P8_GUID如P7_0_,ingestdocs0_.INGESTION_STATUS如INGESTIO8_0_,ingestdocs0_.LOAN_NUMBER如LOAN_NUM9_0_,ingestdocs0_.PROCESS_DATE如PROCESS10_0_,ingestdocs0_.Status_Code如Status_11_0_,ingestdocs0_.Vendor_Name如Vendor_12_0_从dbo.BKFS_Invoice_Ingestion ingestdocs0_其中ingestdocs0_.BATCH_NAME=@P0和ingestdocs0_ .CONTENT_FILE_NAME=@P1 and ingestdocs0_.INGESTION_STATUS=@P2 and ingestdocs0_.Vendor_Name=@P3 ',N'@P0 nvarchar(4000),@P1 nvarchar(4000),@P2 int,@P3 nvarchar(4000)
【问题讨论】:
标签: sql-server hibernate jpa spring-data-jpa