Thanks for your response. I actually got it working shortly after I posted. But now I have another question. I have been working through the tutorial, and am down to creating the XML mappings, and I understand everything until setting up the associations.
The association tag has an attribute of Target that represents "The name of the attribute to store the resultant object(s) in." This is where I'm confused. What do these objects "result" from? Also, in the XML mapping that corresponds to the tutorial, the object names given Target do not appear to match any defined class. For example, the first association listed, from COrderHeader to CCustomer has a target of "Customer". Is this the same as CCustomer? I should note that I'm not at all familiar with VB in any of it's flavors, so if the C prefix is a special syntax notation or something like that, I'm clueless. Thanks for your help.
I'm trying to get this running for a software development class. We were given the choice of "build or buy", and your Framework looks like an excellent tool, so I went with that. Now I'm just trying to figure out how to use it. I quickly found out that I didn't understand the whole concept of a persistence framework as well as I thought! :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Firstly, the C prefix before the class name just represents (C)lass - for example CCustomer is the class definition for a Customer object.
Now for the associations. In the COrderHeader class mapping we have the following:
<attribute name="Customer"/>
This corresponds to the Customer attribute in the COrderHeader class definition. In the COrderHeader class this is represented as
Private m_Customer As CCustomer
In you association, the association is marked to automatically retrieve the linked object and to place the object in the Customer attribute. In terms of the database what happens is the following:
1. The Order Header table is read and the column data is put into the new object.
2. The CustomerOID value is then used as the key to the Customer table and the corresponding record is read.
3. A new customer object is created and the values from the table are put into the objects attributes.
4. Based on the target attribute of the association the customer attribute of the order header is then set to the new customer object that we have just created.
What does this mean? If I haven't retrieved the customer object already, I can retrieve a customer order and the customer object is automatically retrieved, populated and references by the customer order.
I hope that makes sense for you. I'll get the rest of the web site updated soon (ie how to use framework in code)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your response. I actually got it working shortly after I posted. But now I have another question. I have been working through the tutorial, and am down to creating the XML mappings, and I understand everything until setting up the associations.
The association tag has an attribute of Target that represents "The name of the attribute to store the resultant object(s) in." This is where I'm confused. What do these objects "result" from? Also, in the XML mapping that corresponds to the tutorial, the object names given Target do not appear to match any defined class. For example, the first association listed, from COrderHeader to CCustomer has a target of "Customer". Is this the same as CCustomer? I should note that I'm not at all familiar with VB in any of it's flavors, so if the C prefix is a special syntax notation or something like that, I'm clueless. Thanks for your help.
I'm trying to get this running for a software development class. We were given the choice of "build or buy", and your Framework looks like an excellent tool, so I went with that. Now I'm just trying to figure out how to use it. I quickly found out that I didn't understand the whole concept of a persistence framework as well as I thought! :)
OK, Let's see if we can sort this out...
Firstly, the C prefix before the class name just represents (C)lass - for example CCustomer is the class definition for a Customer object.
Now for the associations. In the COrderHeader class mapping we have the following:
<attribute name="Customer"/>
This corresponds to the Customer attribute in the COrderHeader class definition. In the COrderHeader class this is represented as
Private m_Customer As CCustomer
In you association, the association is marked to automatically retrieve the linked object and to place the object in the Customer attribute. In terms of the database what happens is the following:
1. The Order Header table is read and the column data is put into the new object.
2. The CustomerOID value is then used as the key to the Customer table and the corresponding record is read.
3. A new customer object is created and the values from the table are put into the objects attributes.
4. Based on the target attribute of the association the customer attribute of the order header is then set to the new customer object that we have just created.
What does this mean? If I haven't retrieved the customer object already, I can retrieve a customer order and the customer object is automatically retrieved, populated and references by the customer order.
I hope that makes sense for you. I'll get the rest of the web site updated soon (ie how to use framework in code)