第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

換了好幾個(gè)版本的驅(qū)動(dòng)都是報(bào)同樣的問(wèn)題。請(qǐng)幫忙解決下。

換了好幾個(gè)版本的驅(qū)動(dòng)都是報(bào)同樣的問(wèn)題。請(qǐng)幫忙解決下。

qq_遁去的一_1 2023-04-01 13:09:16
在調(diào)用 Account.dao.findAll () 時(shí)報(bào)如下錯(cuò)誤。 execute error. SELECT * FROM sso_userorg.postgresql.util.PSQLException: ERROR: syntax error at or near "RETURNING"采用的驅(qū)動(dòng)為<dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.4-1202-jdbc4</version> </dependency>Account 類(lèi)如下: /**  * Created by loyin on 15/9/6.  */ @Table(name="sso_user") public class Account extends Model<Account> { public static Account dao=new Account(); }
查看完整描述

2 回答

?
拉莫斯之舞

TA貢獻(xiàn)1820條經(jīng)驗(yàn) 獲得超10個(gè)贊

Whe using PostgreSQL, all SELECT statements will fail with message: org.postgresql.util.PSQLException: ERROR: syntax error at or near "RETURNING"

Seems to be related to this issue

This has been fixed with version 1.1.2.

The fix requires the QuirkMode enum flag to be set to PostgreSQL when creating a new instance of sql2o. It changes default behaviour of queries to NOT fetch generated keys by default. When it is needed to fetch generated keys, the returnGeneratedKeys parameter in the generateQuery method should be set.


查看完整回答
反對(duì) 回復(fù) 2023-04-03
?
慕村9548890

TA貢獻(xiàn)1884條經(jīng)驗(yàn) 獲得超4個(gè)贊

@Table(xxx,generatedKey="")如果沒(méi)有自增并且是自己手動(dòng)set值,把自增主鍵設(shè)置為空,其實(shí)@Table 里已經(jīng)設(shè)計(jì)了 代碼級(jí)的主鍵生成策略,你可以自實(shí)現(xiàn)  Generator,不用每次都自己手動(dòng)set進(jìn)去,@Table(xxx,generatedKey="id",generator=xx.class,generated=true)  使用generator來(lái)生成主鍵

查看完整回答
反對(duì) 回復(fù) 2023-04-03
  • 2 回答
  • 0 關(guān)注
  • 159 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)