Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0020505
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. Platformmajoralways2012-05-15 13:492022-02-01 08:08
ReportermiruritaView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabasePostgreSQLJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0020505: Validate during export.database any unique constraint containing nullable columns

Descriptionunique constraints containing nullable columns are not working as expected in PostgreSQL.

we should add a validation (clear warning message) during export.database ant target for checking any unique constraint defined with nullable columns.

http://www.postgresql.org/docs/8.1/static/ddl-constraints.html [^] [^]

"In general, a unique constraint is violated when there are two or more rows in the table where the values of all of the columns included in the constraint are equal. However, null values are not considered equal in this comparison. That means even in the presence of a unique constraint it is possible to store duplicate rows that contain a null value in at least one of the constrained columns. This behavior conforms to the SQL standard, but we have heard that other SQL databases may not follow this rule. So be careful when developing applications that are intended to be portable."
Steps To Reproduce[PostgreSQL]

c_conversion_rate_document table has the following unique constraint:
constraint c_conversionratedoc_once UNIQUE (c_currency_id, c_currency_id_to, c_invoice_id, fin_payment_id, aprm_finacc_transaction_v_id)

1) Disable the trigger for c_conversion_rate_document
2) Create a new Sales Invoice
3) Go to Exchange Rates tab
4) Create new Exchange Rate (EUR --> EUR)
    - Currency: EUR
    - To Currency: EUR
5) Create again the same exchange rate for EUR --> EUR
    - Currency: EUR
    - To Currency: EUR
6) The unique constraint defined should not allow to create the record in step 4
7) The system allows to create a duplicate exchange rate.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0020142 closedmirurita In Exchange Rate tab, in Sales Invoice Window, it allows to enter more than one exchange rate for the same pair of currencies. 

-  Notes
(0048648)
shuehner (administrator)
2012-05-15 13:58

Note: New validation should appear somewhere to developer:
- might be wad-validation
- or export.database

- Issue History
Date Modified Username Field Change
2012-05-15 13:49 mirurita New Issue
2012-05-15 13:49 mirurita Assigned To => alostale
2012-05-15 13:49 mirurita Modules => Core
2012-05-15 13:57 shuehner Issue Monitored: shuehner
2012-05-15 13:58 shuehner Note Added: 0048648
2012-05-15 16:23 mirurita Relationship added related to 0020142
2017-04-10 14:37 alostale Assigned To alostale => platform
2022-02-01 08:08 alostale Assigned To platform => Triage Platform Base


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker