How to display the attributes of a related entity.

15 Dec '14, 01:15 PM
31,248 Views
No Forum Badges

Hello,

Other than the default User, Group and Module entities, I have 3 more: Payment, Student and Course as shown in this image: http://imgur.com/9oOOEyu. I would like to show the attributes of connected entities, specifically, the name of the course paid for and the name of the student paying within the list of payments (Here's a snapshot of my model: http://imgur.com/TTF01fG). I have tried importing them from the  "displayed attributes" but my list ends up looking like this: http://imgur.com/BRddsyW. Kindly help me.

 

Thanks.

 
x 0
Follow
Answer Answer at this question and get points!
No Forum Badges

Hi Aestimo,

Try to add derivate fields in the Payments table refering the name's needed. For instance, in Payments table add derivate student.name and course.name.

Hope it helps.

By the way, are developing an app for learning courses? Could you share with me your user name on Skype to try to talk since I'm developing an app to do exams online

Regards

 
x 0
No Forum Badges

Sorry I mean add into the domain model not in physical tables. Regards

 
x 0
No Forum Badges

Hello Martin,

Thank you for that answer, I'll try it out and let you know what comes up. Regarding the exam app that you are developing, of course I'd be interested to connect with you as am still learning how to use Webratio and I think that would be a great way to learn; my Skype name is: aestimo.njuguna (But since I'll be away on holiday as from 19/12/2014, I may not be reachable on Skype, but you can always find me on email at: aestimo.njuguna[at]gmail[dot]com).

 

Thanks and kind regards,

Aestimo.

 
x 0
No Forum Badges

Hi Martin,

Thanks by the way for the answer. I've tried what you said, I added an attribute ("Student name") on the Payment entity and when I go to the field's derivation properties and I choose "simple imported attribute", the "Payment" option has no expandable arrow for me to choose the derivate student.name (kindly see this screenshot to see what I mean: http://imgur.com/RVPqfID).

 

Thanks.

Aestimo.

 
x 0
Forum Starter - Level 3

Hi Aestimo, 

you cannot define derived attributes on N-N relationships.

In order to solve your problem, follow these steps for each relationship:

  1. Delete the N-N relationship from your Domain Model
  2. Add the bridge entity in your Domain model and map it manually on the corresponding bridge table in your database (both bridge tables already exist in your DB)
  3. Set the two foreign key columns as the primary key of the entity
  4. Draw two 1-N relationships connecting the new entity with the ones connected through the old N-N relationship. The 1 cardinality is referred to the role of the relationship having the new entity as target.
  5. Map manually the two 1-N relationships using the existing column of the new entity as the foreign key and its oid column as oid of the other entity.
  6. Launch the warning on the Domain Model to be sure that there are not mistakes.

If you want to learn more about this topic please refer to the following online lesson:

 

https://www.webratio.com/learn/learningobject/extending-the-domain-model-derivation

 

 

 
x 0
Answer at this question and get points!

Related questions

Acceder a diferentes site views/ Acces to diferents site views Add to Bag link in ACME any webratio book ? Asking For a Book Attribute comparison in a selector unit Clarification about the NoOperation unit Codigo QR Como hacer un menu en webratio? Conditional Expression "greater than 0" on null fields Connect more query unit Content module page variable won't assign. coupled mandatory fields Create Unit with Date (Year only) Custom Attributes Condition Database Database List is not showing up in App Emulator Data is always created doubled Data Management: Updating Data - Attachments - Updating Data Sample Project Final Description: Unknown tag 'wr:LinkResource' Dudas sobre modelado(Data Flow,Forms y Operation Create) Empty record mistakenly saved en_US codify problem Export XML external link.= Filter information in a Simple List Format currency forward/backward navigation and bookmark in ajax web app "Generation Error" with Generate and Run Generation options problem get the attachment files of an email Get Unit problem Get Year from Date Help for connect public and private site views How can i create pagemenu or landmarkmenu with multiple levels. How does WebRatio represent these IFML elements? / ¿Cómo representa WebRatio estos elementos IFML? How i can reuse modules in multiple projects? How to define the sequence of execution units on a page? How to filter imported attributes? How to include Selector Unit result in Mail Unit Body? How to pass vars to a alternative page How to process IFML Model (build with Eclipse editor) with ATL How to show a page based on a boolean? How to speed up the "last" link using PowerIndexUnit for lots of records How to store data related to an entity in relationships in a project web Insert data into database Insert master page to many hybrid modules Integrating a BPM model into an existent WebML model JSON I/O Unit e informazioni derivate KO Links in Selector Unit Landmark in hybrid module Link localization Links from Index unit with condition Link Visibility Condition Power Index Unit Mail multipla maintain the record order in a sortable list Math Unit to update attributes of an entity? [MOBILE] How I extract information from JSON client side? Modifica Entità tramite file xml Multi Entry Unit: How to forward only checked rows? multi-lingual product description Non riesco a fare funzionare Xml out unit Parametrizzazione Selector Unit Problem Example create Unit (no company in employee table) Problem in adding diagrams in IFML Editor (Eclipse) Problem with query unit! Problem with Scroller Unit query a database Question about Site Views Rename passing attributes Replace ID by its value in another table Search by Selector component does not work Select between parameters Selector unit doesn't return any value in hybrid module Sending mails is not working Sending mails with gmail is not working Setting the Default link for a Switch unit show/hide fields on button click (registration page) [solved] all links transparent, why ? Something leads to wrong condition expression evaluation. sumar atributos de una tabla filtrado por Role Condition Sum entity's values Transportation Link issue Unique Fields using relationship role conditional with null usuarios y grupos utilizzo componenti database Visibility Condition on Multiple Links From Index Unit WebRation - Create Navigation diagram