Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007186Openbravo ERPA. Platformpublic2009-01-28 11:302009-04-21 12:39
shuehner 
mtaal 
normalmajorhave not tried
closedfixed 
5
pi 
 
Core
No
0007186: update.database does use some generated/to be compiled classes but the ant dependencies do not reflect this
... meaning that a developer has to manually use generate.entities to be able to run update.database.
No tags attached.
Issue History
2009-01-28 11:30shuehnerNew Issue
2009-01-28 11:30shuehnerAssigned To => mtaal
2009-01-28 11:30shuehnersf_bug_id0 => 2542719
2009-01-28 11:30shuehnerRegression testing => No
2009-01-29 16:49mtaalNote Added: 0012833
2009-01-29 17:36shuehnerNote Added: 0012843
2009-01-29 19:34svnbotCheckin
2009-01-29 19:34svnbotNote Added: 0012859
2009-01-29 19:34svnbotStatusnew => resolved
2009-01-29 19:34svnbotResolutionopen => fixed
2009-01-29 19:34svnbotsvn_revision => 12517
2009-04-21 12:39psarobeStatusresolved => closed

Notes
(0012833)
mtaal   
2009-01-29 16:49   
I tried to implement a limited generate entities but this would take a fair amount of time (days) to implement as there are a fair amount of dependencies between tables. The result would be a limited model which is fairly big and the time savings are limited.
Note that the time saving for a limited model would only apply in one case:
when doing an update.database after an upgrade

this one case only applies once per installation. Let me know if I missed other cases.

I am changing the generate.entities to only be run if the relevant tables in the database change. I will add this 'smart' gen entities as a dependency of update.database.

gr. Martin
(0012843)
shuehner   
2009-01-29 17:36   
Sounds good, solves the missing classes problem with the new dependency but keeping runtime still low in most cases.
(0012859)
svnbot   
2009-01-29 19:34   
Repository: openbravo
Revision: 12517
Author: mtaal
Date: 2009-01-29 19:34:05 +0100 (Thu, 29 Jan 2009)

Added generate.entities.quick task which only generates entities if the Application Dictionary has changed since the last time the entities were generated.
Added generate.entities.quick as a dependency of update.database, is also executed after update.database
fixes issue 7186 update.database does use some generated/to be compiled classes but the ant dependencies do not reflect this

---
U trunk/build.xml
U trunk/src/build.xml
U trunk/src/org/openbravo/base/gen/GenerateEntitiesTask.java
U trunk/src/org/openbravo/base/model/Column.hbm.xml
U trunk/src/org/openbravo/base/model/ModelObject.java
U trunk/src/org/openbravo/base/model/ModelProvider.java
U trunk/src/org/openbravo/base/model/Module.hbm.xml
U trunk/src/org/openbravo/base/model/Package.hbm.xml
U trunk/src/org/openbravo/base/model/RefList.hbm.xml
U trunk/src/org/openbravo/base/model/RefSearch.hbm.xml
U trunk/src/org/openbravo/base/model/RefTable.hbm.xml
U trunk/src/org/openbravo/base/model/Reference.hbm.xml
U trunk/src/org/openbravo/base/model/Table.hbm.xml
U trunk/src/org/openbravo/service/db/ReferenceDataTask.java
U trunk/src/org/openbravo/service/system/SystemService.java
A trunk/src-test/org/openbravo/test/ant/AntTasksTest.java
D trunk/src-test/org/openbravo/test/ant/CompileCompleteTest.java
U trunk/src-test/org/openbravo/test/base/BaseTest.java
---

https://dev.openbravo.com/websvn/openbravo/?rev=12517&sc=1 [^]