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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0014696
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2010-09-24 13:022012-05-25 12:11
ReportermtaalView Statuspublic 
Assigned Tovmromanos 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revisionb674e1b44a43
ProjectionnoneETAnoneTarget Versionpi
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0014696: Repair db-views which don't have a primary key defined in ad_column

DescriptionAlso the views in AD_Table should have a primary key defined, so one of the ad_column should be marked with key==true.

Here is the list of db views defined in ad_table which don't have a key column:
0 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InvoiceHeaderV because it has no primary key columns
6 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InOutHeaderV because it has no primary key columns
6 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InvoiceProdMonth because it has no primary key columns
6 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view BPartnerV because it has no primary key columns
7 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InvoiceProdWeek because it has no primary key columns
7 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view OrderOpen because it has no primary key columns
7 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InvoiceDay because it has no primary key columns
8 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view DebtPaymentV because it has no primary key columns
8 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InvoiceCustomerVendQtr because it has no primary key columns
8 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InvoiceLineV2 because it has no primary key columns
9 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view TransactionV because it has no primary key columns
9 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InvoiceVendorMonth because it has no primary key columns
9 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view CashDetail because it has no primary key columns
9 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InvoiceMonth because it has no primary key columns
9 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InvoiceCustomerProdQtr because it has no primary key columns
10 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view TransactionSum because it has no primary key columns
10 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InvoiceWeek because it has no primary key columns
10 [main] WARN org.openbravo.base.model.ModelProvider - Ignoring table/view InvoiceV2 because it has no primary key columns
TagsVMA-Reviewed
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0047997)
vmromanos (manager)
2012-04-26 10:48

The following views are currently affected:
'InvoiceV2'
'InvoiceLineV2'
'TransactionV'
'DebtPaymentV'

select *
from ad_table
where not exists (select 1
                  from ad_column
                  where ad_table.ad_table_id = ad_column.ad_table_id
                  and iskey='Y')
(0048020)
vmromanos (manager)
2012-04-26 12:50

Test plan I:
1. Run the following SQL query and check no records are shown:
select *
from ad_table
where not exists (select 1
                  from ad_column
                  where ad_table.ad_table_id = ad_column.ad_table_id
                  and iskey='Y')

Test plan II:
2. Take a look at the warn messages when starting tomcat. No warn messages about "Ignoring table/view because it has no primary key columns" should be displayed, although the ModelProvider is now checking it.
(0048504)
hgbot (developer)
2012-05-09 13:26

Repository: erp/devel/pi
Changeset: b674e1b44a431ab7080bd0942baadc62c0245fe1
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Apr 26 13:39:57 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b674e1b44a431ab7080bd0942baadc62c0245fe1 [^]

Fixed bug 14696: All db tables and views now have a key column

A key column has been added for the following views:
C_DEBT_PAYMENT_V
C_INVOICELINE_V2
C_INVOICE_V2
M_TRANSACTION_V

Apart from that, the mandatory columns (isactive, created,
createdby, updated and updatedby) have been added where missed

Finally the ModelProvider class will now warn about the tables
and views that doesn't have a key column.

---
M src-db/database/model/views/C_DEBT_PAYMENT_V.xml
M src-db/database/model/views/C_INVOICELINE_V2.xml
M src-db/database/model/views/C_INVOICE_V2.xml
M src-db/database/model/views/M_TRANSACTION_V.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src/org/openbravo/base/model/ModelProvider.java
---
(0048524)
mirurita (developer)
2012-05-09 17:59

code review + testing oK
(0049079)
hudsonbot (developer)
2012-05-25 12:11

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5401e185a8b0 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2010-09-24 13:02 mtaal New Issue
2010-09-24 13:02 mtaal Assigned To => rafaroda
2010-09-24 13:09 rafaroda Assigned To rafaroda => adrianromero
2011-06-03 10:59 dalsasua Assigned To adrianromero => dalsasua
2011-07-20 18:12 dalsasua Assigned To dalsasua => jonalegriaesarte
2012-02-15 19:05 iciordia Assigned To jonalegriaesarte => vmromanos
2012-02-16 13:48 vmromanos Tag Attached: VMA-Reviewed
2012-04-26 10:48 vmromanos Status new => scheduled
2012-04-26 10:48 vmromanos Note Added: 0047997
2012-04-26 10:48 vmromanos fix_in_branch => pi
2012-04-26 12:50 vmromanos Note Added: 0048020
2012-05-09 13:26 hgbot Checkin
2012-05-09 13:26 hgbot Note Added: 0048504
2012-05-09 13:26 hgbot Status scheduled => resolved
2012-05-09 13:26 hgbot Resolution open => fixed
2012-05-09 13:26 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b674e1b44a431ab7080bd0942baadc62c0245fe1 [^]
2012-05-09 17:59 mirurita Note Added: 0048524
2012-05-09 17:59 mirurita Status resolved => closed
2012-05-25 12:11 hudsonbot Checkin
2012-05-25 12:11 hudsonbot Note Added: 0049079


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker