Hi all,
first of all thanks for the code generator, it saves me a lot of time
and i like how it allows me to manipulate the DB. great job!
The one thing i would like to ask/i miss is how to add a field to a
sibling or m:n relationship. Lets assume i have "workflow" and
"parameter". A workflow can have multiple parameters and a parameter
can be present in multiple workflows. Now, each relationship of
workflow/parameter can have a particular value set for the parameter,
and i assume it should go in to the map table, right?
something like
Workflow-->AddParameter(parameter, value)
i assume would be the best way to accomplish this... right?
> Hi all,
> first of all thanks for the code generator, it saves me a lot of time
> and i like how it allows me to manipulate the DB. great job!
> The one thing i would like to ask/i miss is how to add a field to a
> sibling or m:n relationship. Lets assume i have "workflow" and
> "parameter". A workflow can have multiple parameters and a parameter
> can be present in multiple workflows. Now, each relationship of
> workflow/parameter can have a particular value set for the parameter,
> and i assume it should go in to the map table, right?
> something like
> Workflow-->AddParameter(parameter, value)
> i assume would be the best way to accomplish this... right?
> Any help/ideas/comments are appreciated! Thanks!
For example:
If we have class Exam and class Student, both siblings.
Now, if we want to enter some marks, I think it must be entered
in class examstudentmap.
I don't know how to do that?
Is there any way to add columns in examstudentmap table???
Any suggestions?
Thanks
> Hi all,
> first of all thanks for the code generator, it saves me a lot of time
> and i like how it allows me to manipulate the DB. great job!
> The one thing i would like to ask/i miss is how to add a field to a
> sibling or m:n relationship. Lets assume i have "workflow" and
> "parameter". A workflow can have multiple parameters and a parameter
> can be present in multiple workflows. Now, each relationship of
> workflow/parameter can have a particular value set for the parameter,
> and i assume it should go in to the map table, right?
> something like
> Workflow-->AddParameter(parameter, value)
> i assume would be the best way to accomplish this... right?
> Any help/ideas/comments are appreciated! Thanks!
There seems to be a misunderstanding between email 1 and 3 and what Mark suggested.
You should consider the mapping table 'off-limits' or invisible to the developer. The mapping table is private to POG and is used by POG to manage the relationships between 2 siblings, i.e. there is currently no way for POG to automatically add and manage columns to the mapping table. Now, you are free to alter the tables and mapping classes manually but we would not recommend it as any time you regenerate a class, your tables will not be in line with your classes.
Now, I understand that you both want to be able to add a "property" or column to the mapping object. I think if you want to do this the "POG way", you should create the 3rd property into its own object, either as a child or sibling. Example:
Exam is sibling of Student and vice-versa. Now, instead of trying to add Marks as a third 'column', you can think of Mark as actually a child of Student (i.e. a student can have many marks, but each mark belongs to only one student).
The relationship between Exam, Student and Mark will be proper and no data will be lost.
> For example: > If we have class Exam and class Student, both siblings. > Now, if we want to enter some marks, I think it must be entered > in class examstudentmap.
> I don't know how to do that?
> Is there any way to add columns in examstudentmap table??? > Any suggestions? > Thanks
> AjejeBraso је написао: > > Hi all, > > first of all thanks for the code generator, it saves me a lot of time > > and i like how it allows me to manipulate the DB. great job!
> > The one thing i would like to ask/i miss is how to add a field to a > > sibling or m:n relationship. Lets assume i have "workflow" and > > "parameter". A workflow can have multiple parameters and a parameter > > can be present in multiple workflows. Now, each relationship of > > workflow/parameter can have a particular value set for the parameter, > > and i assume it should go in to the map table, right?
> > something like
> > Workflow-->AddParameter(parameter, value)
> > i assume would be the best way to accomplish this... right?
> > Any help/ideas/comments are appreciated! Thanks!
This will solve my problem.
I create Mark as child of Student and child of Exam.
Actually, this will create table with 3 columns - examid, studentid
and examid, and we can add
more properties if we want.
> There seems to be a misunderstanding between email 1 and 3 and what Mark
> suggested.
> You should consider the mapping table 'off-limits' or invisible to the
> developer. The mapping table is private to POG and is used by POG to manage
> the relationships between 2 siblings, i.e. there is currently no way for POG
> to automatically add and manage columns to the mapping table. Now, you are
> free to alter the tables and mapping classes manually but we would not
> recommend it as any time you regenerate a class, your tables will not be in
> line with your classes.
> Now, I understand that you both want to be able to add a "property" or
> column to the mapping object. I think if you want to do this the "POG way",
> you should create the 3rd property into its own object, either as a child or
> sibling. Example:
> Exam is sibling of Student and vice-versa. Now, instead of trying to add
> Marks as a third 'column', you can think of Mark as actually a child of
> Student (i.e. a student can have many marks, but each mark belongs to only
> one student).
> The relationship between Exam, Student and Mark will be proper and no data
> will be lost.
> > For example:
> > If we have class Exam and class Student, both siblings.
> > Now, if we want to enter some marks, I think it must be entered
> > in class examstudentmap.
> > I don't know how to do that?
> > Is there any way to add columns in examstudentmap table???
> > Any suggestions?
> > Thanks
> > AjejeBraso је написао:
> > > Hi all,
> > > first of all thanks for the code generator, it saves me a lot of time
> > > and i like how it allows me to manipulate the DB. great job!
> > > The one thing i would like to ask/i miss is how to add a field to a
> > > sibling or m:n relationship. Lets assume i have "workflow" and
> > > "parameter". A workflow can have multiple parameters and a parameter
> > > can be present in multiple workflows. Now, each relationship of
> > > workflow/parameter can have a particular value set for the parameter,
> > > and i assume it should go in to the map table, right?
> > > something like
> > > Workflow-->AddParameter(parameter, value)
> > > i assume would be the best way to accomplish this... right?
> > > Any help/ideas/comments are appreciated! Thanks!