Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014619Openbravo ERPA. Platformpublic2010-09-20 15:352010-10-20 00:00
dalsasua 
mtaal 
normalminoralways
closedfixed 
20Ubuntu 9.04
 
pi 
Core
No
0014619: Generate entities do not notice that a field name has changed one letter to upper
If one field is named (and is associated to an element named) "Subsidy entity", the generate entities will create all getters setters as get/setSubsidyentity. If now name of the field changes to "Subsidy Entity", the generated java class is not modified, so getters/setters will continue to be get/setSubsidyentity, instead of get/setSubsidyEntity in the instance where the change was made. In a fresh instance, the getters/setters will have the upper "E".
This happens even deleting the generated java file.
A work-around is to delete the class file of the generated java.
1.Create a column in any table
2.Name it Subsidy entity
3.Create the field
4.Create a java class that uses through DAL setSubsidyentity
5.Compile
6.Change the name of the column (and element) to Subsidy Entity
7.Compile
8.Realize that everything goes fine
9.Now delete the build folder and compile again
10.Realize that the java created in step 4 will fail to compile, as it uses setSubsidyentity, while the created one is setSubsidyEntity
dev-platform-quick-wins
Issue History
2010-09-20 15:35dalsasuaNew Issue
2010-09-20 15:35dalsasuaAssigned To => mtaal
2010-09-21 12:31hgbotCheckin
2010-09-21 12:31hgbotNote Added: 0031269
2010-09-21 12:31hgbotStatusnew => resolved
2010-09-21 12:31hgbotResolutionopen => fixed
2010-09-21 12:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c0245cb0e221b640b4a7e13a8d8ea0e99a5fee6b [^]
2010-09-27 17:09rafarodaTag Attached: dev-platform-quick-wins
2010-09-29 11:57hudsonbotCheckin
2010-09-29 11:57hudsonbotNote Added: 0031450
2010-10-19 12:04iperdomoNote Added: 0031963
2010-10-19 12:04iperdomoStatusresolved => closed
2010-10-20 00:00anonymoussf_bug_id0 => 3090870

Notes
(0031269)
hgbot   
2010-09-21 12:31   
Repository: erp/devel/pi
Changeset: c0245cb0e221b640b4a7e13a8d8ea0e99a5fee6b
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Sep 21 12:31:00 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c0245cb0e221b640b4a7e13a8d8ea0e99a5fee6b [^]

fixes issue 14619: Generate entities do not notice that a field name has changed one letter to upper

---
M src/org/openbravo/base/model/NamingUtil.java
---
(0031450)
hudsonbot   
2010-09-29 11:57   
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/c0245cb0e221 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/51c2c2967221 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18452.obx [^]
(0031963)
iperdomo   
2010-10-19 12:04   
Tested on pi @ rev eb105fcc4400

* Changed a field name, element name, synchronize terminology
* generate.entities
* Cleared the build folder
* compile.complete

The getters/setters name is consistent