Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0008633Openbravo ERP00. Application dictionarypublic2009-04-18 16:292022-02-01 08:08
rentidee 
Triage Platform Base 
normalmajorhave not tried
scheduledopen 
20rPath Linux
 
 
No
Core
No
0008633: adding references between different modules
I createt a table rent_rentobject for my module rent. In this table I added a varchar(32) named asset_id, I added this table into the datadictionary

I run ant export.database

result:

[exportdatabase] org.openbravo.base.util.CheckException: Table: Asset not found in runtime model, is it maybe inactive?
[exportdatabase] at org.openbravo.base.util.Check.fail(Check.java:37)
[exportdatabase] at org.openbravo.base.model.ModelProvider.getTable(ModelProvider.java:600)
[exportdatabase] at org.openbravo.base.model.ModelProvider.getColumnByReference(ModelProvider.java:693)
[exportdatabase] at org.openbravo.base.model.Column.setReferenceType(Column.java:247)
[exportdatabase] at org.openbravo.base.model.Table.setReferenceTypes(Table.java:139)
[exportdatabase] at org.openbravo.base.model.ModelProvider.initialize(ModelProvider.java:173)
[exportdatabase] at org.openbravo.base.model.ModelProvider.getModel(ModelProvider.java:125)
[exportdatabase] at org.openbravo.base.model.ModelProvider.refresh(ModelProvider.java:109)
[exportdatabase] at org.openbravo.dal.core.DalLayerInitializer.initialize(DalLayerInitializer.java:65)
[exportdatabase] at org.openbravo.dal.core.DalInitializingTask.execute(DalInitializingTask.java:108)
[exportdatabase] at org.openbravo.ddlutils.task.BaseDalInitializingTask.execute(BaseDalInitializingTask.java:79)
[exportdatabase] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[exportdatabase] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[exportdatabase] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exportdatabase] at java.lang.reflect.Method.invoke(Method.java:597)
[exportdatabase] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[exportdatabase] at org.apache.tools.ant.Task.perform(Task.java:348)
[exportdatabase] at org.apache.tools.ant.Target.execute(Target.java:357)
[exportdatabase] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[exportdatabase] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[exportdatabase] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[exportdatabase] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[exportdatabase] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
[exportdatabase] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[exportdatabase] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[exportdatabase] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exportdatabase] at java.lang.reflect.Method.invoke(Method.java:597)
[exportdatabase] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[exportdatabase] at org.apache.tools.ant.Task.perform(Task.java:348)
[exportdatabase] at org.apache.tools.ant.Target.execute(Target.java:357)
[exportdatabase] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[exportdatabase] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[exportdatabase] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[exportdatabase] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[exportdatabase] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[exportdatabase] at org.apache.tools.ant.Main.runBuild(Main.java:758)
[exportdatabase] at org.apache.tools.ant.Main.startAnt(Main.java:217)
[exportdatabase] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[exportdatabase] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[exportdatabase] Error >> tableName: rent_rentobject - columnName: Asset_ID
[exportdatabase] org.openbravo.base.util.CheckException: Reference column for Asset_ID not found in runtime model [ref: 19, refval: -1]
[exportdatabase] at org.openbravo.base.util.Check.fail(Check.java:37)
[exportdatabase] at org.openbravo.base.model.ModelProvider.getColumnByReference(ModelProvider.java:714)
[exportdatabase] at org.openbravo.base.model.Column.setReferenceType(Column.java:247)
[exportdatabase] at org.openbravo.base.model.Table.setReferenceTypes(Table.java:139)
[exportdatabase] at org.openbravo.base.model.ModelProvider.initialize(ModelProvider.java:173)
[exportdatabase] at org.openbravo.base.model.ModelProvider.getModel(ModelProvider.java:125)
[exportdatabase] at org.openbravo.base.model.ModelProvider.refresh(ModelProvider.java:109)
[exportdatabase] at org.openbravo.dal.core.DalLayerInitializer.initialize(DalLayerInitializer.java:65)
[exportdatabase] at org.openbravo.dal.core.DalInitializingTask.execute(DalInitializingTask.java:108)
[exportdatabase] at org.openbravo.ddlutils.task.BaseDalInitializingTask.execute(BaseDalInitializingTask.java:79)
[exportdatabase] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[exportdatabase] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[exportdatabase] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exportdatabase] at java.lang.reflect.Method.invoke(Method.java:597)
[exportdatabase] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[exportdatabase] at org.apache.tools.ant.Task.perform(Task.java:348)
[exportdatabase] at org.apache.tools.ant.Target.execute(Target.java:357)
[exportdatabase] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[exportdatabase] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[exportdatabase] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[exportdatabase] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[exportdatabase] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
[exportdatabase] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[exportdatabase] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[exportdatabase] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exportdatabase] at java.lang.reflect.Method.invoke(Method.java:597)
[exportdatabase] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[exportdatabase] at org.apache.tools.ant.Task.perform(Task.java:348)
[exportdatabase] at org.apache.tools.ant.Target.execute(Target.java:357)
[exportdatabase] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[exportdatabase] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[exportdatabase] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[exportdatabase] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[exportdatabase] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[exportdatabase] at org.apache.tools.ant.Main.runBuild(Main.java:758)
[exportdatabase] at org.apache.tools.ant.Main.startAnt(Main.java:217)
[exportdatabase] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[exportdatabase] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Maybe I was wrong and the column should be named ad_asset_id because I planned to link it with the existing asset table of openbravo.

Anyway. I did not change anything in the column properties, so how is it possible that there is a missing asset table? I guess openbravo identifies a relation by the name of the column "_id" without checking if the table really exists and assign a relation to this non existing table.


Just create the table rent_rentobject with a column named asset_id
check if the table really exists in the database before assigning properties to the column making the column a tabledep. Make a check routine after creating table columns in the data dictionary and report errors / problems.
Modularity
Issue History
2009-04-18 16:29rentideeNew Issue
2009-04-18 16:29rentideeAssigned To => rafaroda
2009-04-22 20:18psarobeTag Attached: Modularity
2009-04-22 20:19psarobeOBNetwork customer => No
2009-04-22 20:19psarobeAssigned Torafaroda => alostale
2009-04-22 20:19psarobeStatusnew => scheduled
2009-04-23 12:20psarobeTypedefect => feature request
2017-04-10 14:39alostaleAssigned Toalostale => platform
2022-02-01 08:08alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.