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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0014914
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2010-10-19 13:122010-12-09 16:07
ReportermiruritaView Statuspublic 
Assigned Tomtaal 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision3a1e20b709fe
ProjectionnoneETAnoneTarget Version
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

0014914: Error related to views in DAL: cannot modify a column which maps to a non key-preserved table

DescriptionWhen trying to process a Payment Proposal that has been paid partially it shows the following error
Oracle: ORA-01779: cannot modify a column which maps to a non key-preserved table
Caused by: java.sql.BatchUpdateException: ORA-01779: cannot modify a column which maps to a non key-preserved table
    at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:629)
    at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9409)
    at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:211)
    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)


PostgreSQL: cannot insert into a view
0 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Batch entry 0 insert into FIN_Payment_Prop_Detail_V (AD_Client_ID, AD_Org_ID, Isactive, Created, Createdby, Updated, Updatedby, FIN_Payment_Scheduledetail_ID, FIN_Payment_Proposal_ID, Invoiceno, Duedate, Invoicedamt, Expected, Paidamt, C_Bpartner_ID, Writeoffamt, FIN_Payment_Prop_Detail_V_ID) values (1000000, 1000000, Y, 2010-10-26 16:33:27.907000 +0200, 100, 2010-10-26 16:33:28.574000 +0200, 100, FF8080812BE8F4B1012BE8F540FD001B, FF8080812BE8F4B1012BE8F53DF40017, 200015, 2010-10-26 00:00:00.000000 +0200, 182.00, 182.00, 100, 1000008, 0, FF8080812BE8F4B1012BE8F540FE001C) was aborted. Call getNextException to see the cause.


It was working successfully before the support to views was included in core.
Steps To Reproduce1) Install APRM 1.0.7 module and import the dataset.

2) Create a Payment Method in Financial Management || Receivables & Payables || Setup || Payment Method || Payment Method
With the following configuration
Allow Payment IN / OUT: Yes / Yes
Automatic receipt / deposit: No / No
Automatic payment / withdrawn: No / No
Execution type: Manual
Upon receipt / deposit: In transit
Upon deposit / withdrawn: Deposit / Withdrawn
Upon clearing use: Cleared account

3) Create a new Financial account in Financial Management || Receivables & Payables || Transactions || Financial Account || Account
3.1) Go to Payment Method tab and associate the previously created Payment Method.

4) Create and complete 2 Purchase invoices for different business partners and select the previously created payment method.

5) Go to Financial Management || Receivables & Payables || Transactions || Payment Proposal || Header and create a new one with the following info:
Payment Method: previously created payment method.
Financial account: previously created financial account;
Payment Date: today.

5) Press Select Expected Payments buttons and pay partially two payments. Enter less amount than expected in the editable textboxes of the grid. Click Process button.

6) Finally click on Generate Payments button and the error will appear.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0032229)
mirurita (developer)
2010-10-26 16:40

I've created an JUnit test case to easily reproduce the issue. It does the steps described before.

Clone the repository [1] (it depends on the User Interface Selector) and launch the following ant task: "ant PaymentTest_05"

It is reproducible in Oracle and PostgreSQL.

[1]https://code.openbravo.com/erp/pmods/org.openbravo.advpaymentmngt/ [^]
(0032301)
dmitry_mezentsev (developer)
2010-10-28 13:21

This issue blocks MP23 release.
(0032308)
hgbot (developer)
2010-10-28 15:37

Repository: erp/devel/pi
Changeset: 3a1e20b709fef01342aee00e450346cb8b87f5f2
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Oct 28 15:36:33 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3a1e20b709fef01342aee00e450346cb8b87f5f2 [^]

Fixes issue 14914: Error related to views in DAL: cannot modify a column which maps to a non key-preserved table

---
M src/org/openbravo/dal/core/DalMappingGenerator.java
---
(0032312)
hgbot (developer)
2010-10-28 16:38

Repository: erp/devel/pi
Changeset: 0a0fb2432e0d82f840168b004e3381318179975f
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Oct 28 16:38:06 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0a0fb2432e0d82f840168b004e3381318179975f [^]

Related to issue 14914: Error related to views in DAL: cannot modify a column which maps to a non key-preserved table

---
M src-test/org/openbravo/test/dal/ViewTest.java
M src/org/openbravo/dal/core/DalUtil.java
---
(0032316)
shuehner (administrator)
2010-10-28 17:18

First changeset (a1e20b709fef01342aee00e450346cb8b87f5f2) reviewed & tested. > working fine
(0032438)
hudsonbot (developer)
2010-11-05 12:44

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/3a1e20b709fe [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/f2cf138fa03c [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18797.obx [^]
(0032440)
hudsonbot (developer)
2010-11-05 12:44

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/0a0fb2432e0d [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/f2cf138fa03c [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18797.obx [^]
(0032870)
shuehner (administrator)
2010-11-25 20:14

Second part reviewed. Looks ok, and newly added junit testcase for it also succeeds.

- Issue History
Date Modified Username Field Change
2010-10-19 13:12 mirurita New Issue
2010-10-19 13:12 mirurita Assigned To => mtaal
2010-10-25 08:55 alostale Status new => scheduled
2010-10-26 16:40 mirurita Note Added: 0032229
2010-10-26 16:42 mirurita Description Updated View Revisions
2010-10-28 13:21 dmitry_mezentsev Note Added: 0032301
2010-10-28 13:21 dmitry_mezentsev Priority urgent => immediate
2010-10-28 15:37 hgbot Checkin
2010-10-28 15:37 hgbot Note Added: 0032308
2010-10-28 15:37 hgbot Status scheduled => resolved
2010-10-28 15:37 hgbot Resolution open => fixed
2010-10-28 15:37 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3a1e20b709fef01342aee00e450346cb8b87f5f2 [^]
2010-10-28 16:38 hgbot Checkin
2010-10-28 16:38 hgbot Note Added: 0032312
2010-10-28 17:18 shuehner Note Added: 0032316
2010-11-05 12:44 hudsonbot Checkin
2010-11-05 12:44 hudsonbot Note Added: 0032438
2010-11-05 12:44 hudsonbot Checkin
2010-11-05 12:44 hudsonbot Note Added: 0032440
2010-11-25 20:14 shuehner Note Added: 0032870
2010-11-25 20:14 shuehner Status resolved => closed
2010-12-09 16:07 anonymous sf_bug_id 0 => 3133520


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker