
|
If you were logged in you would be able to see more operations.
|
|
|
|
The following exception isthrown if you model a many to many association with both ends pointing to the same entity. The problem is in the code where you assume that there are two endTypes. In this case there is only one because the ends point to the same entity. If you call get(1) you get the NullPointer. Here is the whole exception:
9718 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component hibernateCartridge_mapping_generator of type org.openarchitectureware.xpand2.Generator:
EvaluationException : index=1, size=1
org::fornax::cartridges::uml2::hibernate::extensions::Hibernate.ext[8788,6] on line 248 'a.endType.get(1)'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[16891,26] on line 443 'association.mappingTable()'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[15737,24] on line 408 'EXPAND ManyToMany_Entity'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[6723,65] on line 185 'EXPAND toMany_Entity FOREACH getAllToManyAssociationsToEntities()'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[3350,32] on line 101 'EXPAND propertiesAndAssociations'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[2415,19] on line 72 'EXPAND classElement'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[1710,30] on line 51 'EXPAND hibernateMappingElement'
org::fornax::cartridges::uml2::hibernate::templates::feature_mappings.xpt[1250,69] on line 34 'EXPAND Mapping::Start FOREACH getTopELementOfGeneralisationEntities()'
[23,92] on line 1 'EXPAND org::fornax::cartridges::uml2::hibernate::templates::feature_mappings::Root FOR model'
If you need an example model for a test please contact me, I can send it to you.
|
|
Description
|
The following exception isthrown if you model a many to many association with both ends pointing to the same entity. The problem is in the code where you assume that there are two endTypes. In this case there is only one because the ends point to the same entity. If you call get(1) you get the NullPointer. Here is the whole exception:
9718 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component hibernateCartridge_mapping_generator of type org.openarchitectureware.xpand2.Generator:
EvaluationException : index=1, size=1
org::fornax::cartridges::uml2::hibernate::extensions::Hibernate.ext[8788,6] on line 248 'a.endType.get(1)'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[16891,26] on line 443 'association.mappingTable()'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[15737,24] on line 408 'EXPAND ManyToMany_Entity'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[6723,65] on line 185 'EXPAND toMany_Entity FOREACH getAllToManyAssociationsToEntities()'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[3350,32] on line 101 'EXPAND propertiesAndAssociations'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[2415,19] on line 72 'EXPAND classElement'
org::fornax::cartridges::uml2::hibernate::templates::Mapping.xpt[1710,30] on line 51 'EXPAND hibernateMappingElement'
org::fornax::cartridges::uml2::hibernate::templates::feature_mappings.xpt[1250,69] on line 34 'EXPAND Mapping::Start FOREACH getTopELementOfGeneralisationEntities()'
[23,92] on line 1 'EXPAND org::fornax::cartridges::uml2::hibernate::templates::feature_mappings::Root FOR model'
If you need an example model for a test please contact me, I can send it to you. |
Show » |
|
//Computing the value of the table attribute inside an collection mapping
String mappingTable (Association a) :
let endTypeNames = a.memberEnd.type.name :
endTypeNames.get(0).compareTo(endTypeNames.get(1)) < 0 ?
endTypeNames.get(0).toUpperCase() +"_" +endTypeNames.get(1).toUpperCase() :
endTypeNames.get(1).toUpperCase() +"_" +endTypeNames.get(0).toUpperCase();
Please verify the bugfix and set the issue to closed if it works also for you.
Regards
Darius