I am in the process of migration of the AtomsFrameWork 2.0 for 2.2 version. Now, i am not saving nothing. In the following code stretch, the code inside of If clause not is executed, therefore this is clause not is truth.
If GetType(AssociationItem).IsInstanceOfType(qObject) Then
persistentBroker.SaveAssociationObject(qObject)
The above code is in the CPersistenceObject class, inside of save method. My question is this:
What is AssociationItem? For what i observed in the XMLMapping.xsd, it must be in the tag <map> of the xml file. However, i dont understood what is AssociationItem and as it would be used in the <map> tag, therefore this is tag is used for to configure the database all.
Thanks,
Meiriana.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The AssociationItem class is used for managing many-to-many associations.
When you save an object, if it is part of a M-N association then the framework needs to create records in the association table (defined in the XML). The AssociationItem class is used for this purpose.
- Richard
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But the association must be make for each table of the database what has associantion with another table. Second the xsd file, the <map> tag must to have an tag <association>. Which association i use if i have more than one?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, you need to create an <association> for each association of a class.
In a normal project there will be many associations. The framework determines which associations to process based on what you are doing.
For MultiRetrieveCriteria where there is a chance for ambiguity if there are multiple associations between two classes then the association name can be used to specify which one should be used.
I'm not sure what the exact problem is, so maybe you can give me an example and I can explain it better to you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am in the process of migration of the AtomsFrameWork 2.0 for 2.2 version. Now, i am not saving nothing. In the following code stretch, the code inside of If clause not is executed, therefore this is clause not is truth.
If GetType(AssociationItem).IsInstanceOfType(qObject) Then
persistentBroker.SaveAssociationObject(qObject)
The above code is in the CPersistenceObject class, inside of save method. My question is this:
What is AssociationItem? For what i observed in the XMLMapping.xsd, it must be in the tag <map> of the xml file. However, i dont understood what is AssociationItem and as it would be used in the <map> tag, therefore this is tag is used for to configure the database all.
Thanks,
Meiriana.
The AssociationItem class is used for managing many-to-many associations.
When you save an object, if it is part of a M-N association then the framework needs to create records in the association table (defined in the XML). The AssociationItem class is used for this purpose.
- Richard
But the association must be make for each table of the database what has associantion with another table. Second the xsd file, the <map> tag must to have an tag <association>. Which association i use if i have more than one?
Yes, you need to create an <association> for each association of a class.
In a normal project there will be many associations. The framework determines which associations to process based on what you are doing.
For MultiRetrieveCriteria where there is a chance for ambiguity if there are multiple associations between two classes then the association name can be used to specify which one should be used.
I'm not sure what the exact problem is, so maybe you can give me an example and I can explain it better to you.