Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3107 Lượt xem

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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You can check importing with sample date.

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
@api.constrains Đã xử lý
2
thg 12 23
3136
0
thg 6 21
2577
1
thg 11 20
4378
2
thg 3 24
5532
1
thg 7 23
1561