Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3287 มุมมอง

hello guys. i want to ask some questions about SQL constraints when importing data in odoo

let's say i have 1 field (name) and I've added SQL constraints unique to that field.. what happens if we importing 2 rows with the same name?


for example:
rows 1: test123
rows 2: test123


do the validation sql constraints pop up shows or we keep importing the data but only the last row (row 2)? thanks


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,
The SQL constraints do work while importing data.
Regards

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can check importing with sample date.

I think import will fail due to constraint error. Once remove duplicate row, then only import success.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
@api.constrains แก้ไขแล้ว
2
ธ.ค. 23
3426
0
มิ.ย. 21
2731
1
พ.ย. 20
4540
_sql_constraints fail to be effective แก้ไขแล้ว
2
มี.ค. 24
5775
1
ก.ค. 23
1751