Hello,

I am creating an Object Relational Mapper in pharo using sqlite.

While creating database I am using a dictionary for columns of Database. This 
gives me Keys as column name and values as Data type of those.

So suppose Employee is the the table name, with ID->Integer, Name->Text, 
Salary->Float.

emp:= Employee new.
Now emp is a row of table, so for each row user has to create instance of 
Employee and then feed values to it. Later on he can pass message insert query 
to emp.

So I was creating this dictionary for column at the instance side 
initialization of Employee.

My instructor suggested to do that in class side initialization,

My Doubts are:

1. Why should we do class side initialization instead of instance side 
initialization.

2. Could you please refer me to the link which explains how to do class side 
initialization. Because when I do Employee new, I see only instance side 
initialization is being called.

Thanks,
Harshit


Reply via email to