Re: ERD2WEditToManyRelationship
Ramsey Gurley <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Don't try to model a many-to-many relationship yourself. You'll screw it up :-) Too many fiddly bits to remember. Let the EntityModeler tool do it. That's what I do.
Ramsey
On Jul 19, 2012, at 11:11 AM, Pranathi wrote:
> I tried the flattened relationship too and have the propagateprimarykey checked. But I get the following error, so i was trying the courseState relationship
>
> java.lang.IllegalStateException: A valid global ID could not be obtained for entity named CourseState, relationship named samsStates, primary key dictionary {idState = 1000; idCourse = 7796; }.
>
> Thanks
> Pranathi
>
> Speed is good only when wisdom leads the way. -James Poe
> From: Ramsey Gurley <[email protected]>
> To: Pranathi <[email protected]>
> Cc: Project Wonder <[email protected]>
> Sent: Thursday, July 19, 2012 2:07 PM
> Subject: Re: [Wonder-disc] ERD2WEditToManyRelationship
>
>
> On Jul 19, 2012, at 10:57 AM, Pranathi wrote:
>
> > Hi,
> >
> > Editing a relation has always been a task for me. I am working on a edit toMany relation on a Course table with the CourseState table. CourseState is a relationship table that holds just the coursed and stateid. I need to get to State table and display all the state codes on a create(or edit) page (CreateCoursePage). I used the following rules but just not able to display what I wanted.
> >
> >
> > 60 : (propertyType = 'r' and relationship.destinationEntity.name = 'CourseState') => keyWhenRelationship = "samsState.code" [com.webobjects.directtoweb.Assignment]
>
>
> If you model this as a typical many to many, then your property key would be a flattened relationship through CourseStates, and you could just use
>
> 60 : (propertyType = 'r' and relationship.destinationEntity.name = 'State') => keyWhenRelationship = "code" [com.webobjects.directtoweb.Assignment]
>
> I think that will give you what you want.
>
> Ramsey
>
> >
> > 110 : (pageConfiguration = 'CreateSamsCourse' and propertyKey = 'courseStates') => componentName = "ERD2WEditToManyRelationship" [com.webobjects.directtoweb.Assignment]
> >
> > 150 : (entity.name = 'SamsCourse' and task = 'edit') => displayPropertyKeys = ("idCode", "name", "abbreviation", "samsCourseSubject", "samsCourseLevel", "samsCourseLength", "samsCourseContentType", "samsCourseVendor", "defaultCredits", "samsGradeLevel", "courseStates", "samsCourseSchedules") [com.webobjects.directtoweb.Assignment]
> >
> >
> > Any help is appreciated
> >
> > Thanks
> > Pranathi
> >
> >
> > ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> > Wonder-disc mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wonder-disc
>
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Wonder-disc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wonder-disc