Google Groups Home
Help | Sign in
how to add values to sibling relationships
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
AjejeBraso  
View profile
 More options Jul 8, 11:42 am
From: AjejeBraso <andreas.destef...@gmail.com>
Date: Tue, 8 Jul 2008 08:42:52 -0700 (PDT)
Local: Tues, Jul 8 2008 11:42 am
Subject: how to add values to sibling relationships
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!

A


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Crispy  
View profile
 More options Jul 9, 7:42 am
From: Crispy <marksle...@gmail.com>
Date: Wed, 9 Jul 2008 04:42:20 -0700 (PDT)
Local: Wed, Jul 9 2008 7:42 am
Subject: Re: how to add values to sibling relationships
If Workflow is a class and Parameter is a class, then this is what I
would be doing...

$workflow = new Workflow();
$workflow->Get($existingId);

$parameter = new Parameter();
$parameter->value = "something";

$workflow->AddParameter($parameter);

...

-Mark

On Jul 8, 9:42 am, AjejeBraso <andreas.destef...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vlada  
View profile
 More options Aug 12, 4:42 pm
From: Vlada <ilicvladimi...@gmail.com>
Date: Tue, 12 Aug 2008 13:42:45 -0700 (PDT)
Local: Tues, Aug 12 2008 4:42 pm
Subject: Re: how to add values to sibling relationships
I have the same problem:

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 је написао:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joel Wan  
View profile
 More options Aug 12, 5:35 pm
From: "Joel Wan" <joel...@gmail.com>
Date: Tue, 12 Aug 2008 15:35:46 -0600
Local: Tues, Aug 12 2008 5:35 pm
Subject: Re: [Php-Object-Generator:1846] Re: how to add values to sibling relationships

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.

Thoughts?

2008/8/12 Vlada <ilicvladimi...@gmail.com>


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vlada  
View profile
 More options Aug 13, 11:39 am
From: Vlada <ilicvladimi...@gmail.com>
Date: Wed, 13 Aug 2008 08:39:26 -0700 (PDT)
Local: Wed, Aug 13 2008 11:39 am
Subject: Re: [Php-Object-Generator:1846] Re: how to add values to sibling relationships
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.

Again, thanks a lot!!!

Joel Wan је написао:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google