implementing 1-N association
Posted on 2006-04-04
I want to recore samo data in database table. Let me say the name of the table as Educaton. Table Educatin has a 1-N relationship with the table Person. To do this, I have create two class as follows.
public Class Person
//I have create the association as collections
public System.Collection.ArrayList myEducation=new ArrayList();
private int educationPointer=0;
//I have created a method that is used for populating the data list
public addEducation( Education me)
Public Class Education
//I have a method to save all the Education Information
public System.Boolean Save()
//In this method I have called the some method to execute the necessary sql string
For both classes, I have coded the properties and variables but I do not write them here.
My problem is like that;
From now on What should be the coding strategy in order to implement the 1-n association between the Education and Person Class and save the Education information to the database.