Many - to - many view links (master-detail)

Case :
I have a relation many-to-many between two tables, composed of 3 tables:
Table Users ( User_Id, User_name ) // Master 1
Table Groups ( Group_Id, Group_name ) // Master 2
Table Users_Groups ( User_Id, Group_Id ) // Child (holding then many - many relation)
Need :
I want to make Master-detail relation, so that when I change the group (Master 2) the details of the users - user_id, user_name - in this group appear in table below.
problem :
All the master-detail examples I have seen in Jdeveleoper, between One - many realtionship, where the details table contain the information to be displayed; now my case that the details to be displayed is in another table (Master 1) not in the child table directly.
So using ordinary view Link between the a master table and the child table displayes only the Id's of the child table but I need that the names that in (Master 1) table which is related to the selected master id.
Thankx

Duplicate of add where clause to detail view in master/detail relation
Timo

Similar Messages

  • Using bind variables in the model view for master detail

    Hi all,
    I have a master-detail views setup on the following two queries.
    In the first query below - I use two bind variables to collect the start and end date.
    you have to add (and :startDate = :startDate and :endDate = :endDate) or you will get errors - bind not defined in sql
    I then use the viewQueryCriteria to collect the data on a search panel - so far so good. (Make the bind variables required) along with the other criteria.
    The bind variables are displayed in the search panel and the data is entered correctly.
    The query executes and all is happy.
    VIEWOBJECT1
    SELECT DepositAccounts.COA_ID,
    ... ChartOfAccounts.ACCOUNT_CODE || ' ' || ChartOfAccounts.ACCOUNT_TITLE as description
    FROM DEPOSIT_ACCOUNTS DepositAccounts, DEPOSIT_ACCOUNT_DETAILS DepositAccountDetails, CHART_OF_ACCOUNTS ChartOfAccounts
    WHERE DepositAccounts.ID = DepositAccountDetails.DEP_ACC_ID
    and ChartOfAccounts.id = DepositAccountDetails.COA_ID
    and :startDate = :startDate and :endDate = :endDate
    Now I add the summation of a value (AMOUNT) to the view object (java - create view impl) to the VOViewRowImpl
    and everything works - the value is shown in the transient attribute formatted and looking nice.
    VIEWOBJECT2
    SELECT PostingBatchAccounts.AMOUNT,
    FROM POSTING_BATCH_ACCOUNTS PostingBatchAccounts, POSTING_BATCHES PostingBatches
    where PostingBatchAccounts.PB_ID = PostingBatches.ID
    and PostingBatches.SOURCE_DATE between :startDate and :endDate
    Now I need to add the start date and end date to the child query - before the view executes (or the summation is calculated).
    The attributes are in the where clause (PostingBatches.SOURCE_DATE between :startDate and :endDate) in VIEWOBJECT2 which is the child.
    I need the child records and the summation to work with the date restrictions.
    I would assume you could get access to the child view in the VOViewImpl file and set the bind variables there.
    Everything I find is based on the JSF - not the model layer - this should be fairly easy (and common). can anyone give me a hand on this?

    Hi all,
    I have a master-detail views setup on the following two queries.
    In the first query below - I use two bind variables to collect the start and end date.
    you have to add (and :startDate = :startDate and :endDate = :endDate) or you will get errors - bind not defined in sql
    I then use the viewQueryCriteria to collect the data on a search panel - so far so good. (Make the bind variables required) along with the other criteria.
    The bind variables are displayed in the search panel and the data is entered correctly.
    The query executes and all is happy.
    VIEWOBJECT1
    SELECT DepositAccounts.COA_ID,
    ... ChartOfAccounts.ACCOUNT_CODE || ' ' || ChartOfAccounts.ACCOUNT_TITLE as description
    FROM DEPOSIT_ACCOUNTS DepositAccounts, DEPOSIT_ACCOUNT_DETAILS DepositAccountDetails, CHART_OF_ACCOUNTS ChartOfAccounts
    WHERE DepositAccounts.ID = DepositAccountDetails.DEP_ACC_ID
    and ChartOfAccounts.id = DepositAccountDetails.COA_ID
    and :startDate = :startDate and :endDate = :endDate
    Now I add the summation of a value (AMOUNT) to the view object (java - create view impl) to the VOViewRowImpl
    and everything works - the value is shown in the transient attribute formatted and looking nice.
    VIEWOBJECT2
    SELECT PostingBatchAccounts.AMOUNT,
    FROM POSTING_BATCH_ACCOUNTS PostingBatchAccounts, POSTING_BATCHES PostingBatches
    where PostingBatchAccounts.PB_ID = PostingBatches.ID
    and PostingBatches.SOURCE_DATE between :startDate and :endDate
    Now I need to add the start date and end date to the child query - before the view executes (or the summation is calculated).
    The attributes are in the where clause (PostingBatches.SOURCE_DATE between :startDate and :endDate) in VIEWOBJECT2 which is the child.
    I need the child records and the summation to work with the date restrictions.
    I would assume you could get access to the child view in the VOViewImpl file and set the bind variables there.
    Everything I find is based on the JSF - not the model layer - this should be fairly easy (and common). can anyone give me a hand on this?

  • Refresh problem by combination of programmatic view and master-detail page

    I am using the latest versions of both ADF (10.1.3.2.0.4066) and JHeadstart (10.1.3.1.26) and I have an application with 1 page in which I have as root page a programmatic view (table-form) which I fill with request parameters.
    Under that programmatic view I have a master (table) with 3 detail pages (table).
    The programmatic view is populated with always 1 row, which goes always correct.
    The problem is occuring when iterating through the first entity based master table which contains lots of rows. Then the problem is that when you navigate through the master table the detail pages are refreshed correctly, but when you navigate back to the first row that row won't get updated.
    The next thing I tried is create a new jheadstart application with only the master-detail pages (entity based), so without the programmatic view, and then the iterating through the master table and the refresh of the child tables is working correct.
    What can be the problem here.

    Have you tested this in the ADF Business Components Browser? That's the tester that you can find by right-clicking your ADF BC Application Module and choosing Test. If you go to the View Object instance for the programmatic view, and using the ViewLinks to its children, do you get the same behavior as in the JHeadstart application?
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Database Views and Master-Detail using ADF

    How would I create a master-detail form using a database view for the search-able master table and a database view as the detail table?
    The detail-view will need to be update-able (adf-table) using an instead-of trigger to perform the updates to the database table.
    Thanks in advance...

    There are several sections in the ADF Developer's Guide about using views (http://www.oracle.com/technology/documentation/jdev/b25947_01/index.html):
    - 26.4 Basing an Entity Object on a PL/SQL Package API
    - 6.2.4 Creating an Entity Object for a Synonym or View
    You can also try Steve Muench's web log: http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    There are at least two (old) items there that involve view with instead-off triggers:
    -      Composite Entity Using Stored Procedure API to Create/Modify/Remove Master and Children
    - Entity Object Based on View With Instead Of Triggers Avoiding Returning Into Clause
    Jan Kettenis

  • Master/Detail Form based on view(s) - Bug?

    I made a master/detail form that is based on two views, and later master was a view and detail was a table. The form opens OK, but when I click query-button, the following error appears on the screen:
    An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
    An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
    When you create a form you are offered three different choices:
    1. Form based on table or view
    Build a form based on a database table or view.
    2. Master-detail form
    Build a master-detail form based on two tables or views. <---- ?????
    3. Form based on procedure
    Build a form based on a database stored procedure
    Is it at all possible to use views with master/detail?

    View should have a rowid. To create a rowid tables have to have foreign key relation. And also in where clause you should have PK-Field-Name=FK-Filed-Name statement.
    null

  • Master-Details Link

    Hi,
    I have done master details in obiee 11g,since when i am trying with dimension column its working fine,where my requirement is how to achieve master details link in hirerchial column,in 1st report i have kept product hirerchial cloumn with 1 measure and 2nd report same product hirerchial colum nand 1 measure when i given link master -details link its not working.can anyone suggest how to achieve that.
    Appreciate your earlier response.

    You a right,
    the problem is not in fetching of detaisl VO - when I using table region to show rows of detaisl VO it fetches and dispays data normally, but if I use messagecomponentLayout with 3 messagestyledtext items on it - those items display data when I select different rows in master table, but display nothing when there is singe row in the master table....Should I somehow refresh the messagecomponentLayout region?

  • BC4J many-to-many relationship

    I tried out the how to "Create Many-to-Many Associations and View Links".
    In the Business Component Browser I can only browse the data, but I can't assign a new detail to a master (e.g. a product to a warehouse).
    In an real-world application I want to assign details to masters, specify attributes of the intersection table (in the how to: inventories.quantity_on_hand) and have triggers and sequences for the id columns.
    How to create Associations and View Links for that?
    Bye
    Holger

    Does anyone have details on how to do this? I had the same problem recently and my "solution" was to create a new VO for the intersection table and then insert/remove rows directly to that to manage the relationships. It seems rather redundant to have to do it this way.

  • View Link - Adding criteria dynamically in runtime

    Hi all,
         I'm working on a development in which Hgrid is used to show results based on the user's search criteria. The query to populate the Hgrid region, as expected, is built from a Master VO linked with a Details VO through a View Link.
    As per design model and requirement, I will need to use specific filters on the Details VO besides the already existing link attribute defined to link both Master and Details VO. My question is.. How can I implement this??
    I've tried to use setWhereClause(...) and executeQuery() in the Details VO but it seems that no matter what I include in the WhereClause for the Details VO, it just simple ignores.
    Scenario Example:
    MasterVO attributes (ship_hdr_code, ship_hdr_id)
    View Link (Master.ship_hdr_id = Details.ship_hdr_id)
    DetailsVO attributes (ship_line_code, ship_hdr_id, ship_line_id, amount, currency)
    After querying on MasterVO for ship_hdr_id = 1, View Link will query all lines on DetailsVO in which ship_hdr_id = 1 as well.
    In addition to this, users may want to see only records from DetailsVO that the currency is equal to 'INR'.
    I'd appreciate any help on this.
    Thanks and Regards,
    Eduardo

    Hi,
    I have the same requirement. Have you resolved this?
    Thanks,
    Yasdnil

  • Advanced Table in Table View Link

    Hello All,
    I have an advanced table in advanced table. The detail record is associated with the master record through a view link. Within the master table, whenever I click on the details column (hide/show) link for the first time, I will get the corresponding detail record for that master row. For any subsequent clicks on the hide show link in different rows, all detail records will be the same as whatever detail record was shown first. How do I get the view link and detail VO to refresh based on the row I have just selected the hide/show link on?
    Thanks in Advance!

    Make sure that the key attribute is set for the master and detail VOs

  • ADF - view link join on transient field

    I have created two view objects (master, detail). The master table has a transient attribute which I wish to use as part of the join with the detail record.
    Any takers on how this might be done?
    As an alternative approach, instead of using a join on the transient attribute, I set the where clause of the detail record prior to calling super.executeImpl(actionContext) - should this work?
    Are there any 'detailed specs' on the ADF life cycle? The jdeveloper help doesn't provide much insight into this.
    Thanks

    from the component palatte drag n drop this component into your jsf page.
    more info:
    http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e12419/tagdoc/af_statusIndicator.html
    Using javascript you can change the mouse cursor to an hourglass. Try using clientListener within commandButton and use javascript.
    document.body.style.cursor = "wait";
    document.body.style.cursor = "default";
    Edited by: Puthanampatti on Jan 12, 2010 1:56 PM

  • Export a master-details tables to XML

    Hi, here is my requirement :
    I'm having a page which shows data from 4 views as master details and need to have a command button to export the all these master details data into an xml structured file predefined by a xsd. Would like to get some help , to finish this task using ADF components. Thanks in advance.

    Could any one suggest any documentation , or sample code or demo to export a master details data as a xml file using ADF BC. Thanks.

  • Master/Details Relationship using View Links is not not population data

    Hi,
    I have problem in generating proper data in master/detail relationship using view links passing three parameters between two custom tables can guide me the steps and process how i will able to generate and acheive this requirement.
    very urgent
    Please suggest me

    Without further details, I'd suggest reviewing the following Section of the Fusion Developers Guide:
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/web_masterdetail.htm#ADFFD758
    I've done this many times without issue.

  • Master - detail block (many-to-many)

    Hello, , I have 2 tables:
    1-(parts)its primary key : p_id
    2-(suppliers)its primary key : s_id
    and they have many-to-many relationship between them .
    the table Resulted from the relationship is(part_supp)
    How can I create master-detail block Based on this relationship.In other words, which of tables will be the master and which of them well be detail.
    I am using form 6i ..
    please help.....

    M3ATH wrote:
    Hello, , I have 2 tables:
    1-(parts)its primary key : p_id
    2-(suppliers)its primary key : s_id
    and they have many-to-many relationship between them .Many to many relation between two table isn't a good database design. You have to a junction table between them.
    the table Resulted from the relationship is(part_supp)Is this your junction table(part_supp) ?
    >
    How can I create master-detail block Based on this relationship.In other words, which of tables will be the master and which of them well be detail.If part_supp is your junction table between parts and suppliers then, try this..
    Use the junction table as a hidden block, then establish a standard Forms relation between
    Parts and (hidden)part_supp then between part_supp and suppliersHope this helps

  • SQL-Only Many-to-Many View Links?

    Hi,
    ADF, BC4J, Jdeveloper 10.1.3
    I am working on a reporting system that contains a number of reports on tables that are linked with many-to-many relationships.
    So for example, I have a COMPANIES table that is linked through an intermediate table to a CENTRES table. COMPANIES is also linked in a similar way to VOLUNTEERS. All these links are many-to-many.
    From the companies report page, one can see the centres associated with that company, and vice versa. I would like these to be displayed as clickable links that take the user through to the report page for that table...
    What is the best way to do this?
    Because I am only reporting on these tables (no updates), I have created SQL-only view objects. I thought that View Links might be a good way of listing the associated rows and setting the appropriate row for the reports page when the user clicks a link, but I cant see a way of implementing a view link on a many-to-many relationship between sql-only views.
    Is this possible? Or am I approaching this in the wrong way?
    Any help greatly appreciated,
    Alex.

    Hi,
    ADF, BC4J, Jdeveloper 10.1.3
    I am working on a reporting system that contains a number of reports on tables that are linked with many-to-many relationships.
    So for example, I have a COMPANIES table that is linked through an intermediate table to a CENTRES table. COMPANIES is also linked in a similar way to VOLUNTEERS. All these links are many-to-many.
    From the companies report page, one can see the centres associated with that company, and vice versa. I would like these to be displayed as clickable links that take the user through to the report page for that table...
    What is the best way to do this?
    Because I am only reporting on these tables (no updates), I have created SQL-only view objects. I thought that View Links might be a good way of listing the associated rows and setting the appropriate row for the reports page when the user clicks a link, but I cant see a way of implementing a view link on a many-to-many relationship between sql-only views.
    Is this possible? Or am I approaching this in the wrong way?
    Any help greatly appreciated,
    Alex.

  • Many to Many View Link

    Hello All
    I just wish to know how to create a many to many view link. I have created a many to many association. In the view link wizard it is supposed to show me an association in 2 tables which are associated via the intersection table in the association right? Because that does not happen. I can only see the association in one table, while it is just not there in my source table. The expose check is clicked in both the source and the destination but in the destination table it is just not shown.
    I do not know if I am approaching this the right way? Should I create a view for the intersection table?
    If anyone can shed any light on this I would be eternally gratefull

    I solved the problem but now have a different one.
    The problem was I created some views and then created an association. Unfortunately associations are based on entities and views do no automatically update from the entities, so I had to create a new view, based on the entity AFTER I had created the association. This allowed me to create a many to many view link between the two.
    Here is a question. Is it really neccessary to create these many to many relations (which are in my database) if all I need is to create a read only page (for users with only read privileges)? Because after dropping my new view with a many to many view link onto my jspx page and creating a read only form, It did not really work that well for showing what I needed shown, all it did was show the attributes from the one table, not the 3 (the 2 tables and the intersection) I needed.
    I am probably not making sense, this is just a web of entangled entanglement.

Maybe you are looking for

  • Calling adobe form from webdynpro abap view

    Hi, I need some help. The situation is: I have created a Adobe form interface as well as a form using the SFP transaction. Now, I have a webdynpro screen with a button, which upon pressed must give the output of the PDF form. I tried the following st

  • Import vob file to imovie no tone

    I managed to import a .vob file from a disk to imovie, with the import/file function in imovie.  But there is no tone with the film.  When I check the vob file with MPEGstremclip of Quicktime , there is a tone. Any help how to import the vob file wit

  • Using 1231 G for wireless bridge Service

    Hi Forum I have built up a network in the following fashion . Connected 1231 G to a 2950 G switch, port 3 is connected to DHCP server.On the Receiving end i have connected one 1121 G to 2950 Switch on port 1 and configured the same in Workgroup Bridg

  • AT&T and new iPhone Question

    Hey everyone, I had a quick question I was hoping someone could help me answer regarding upgrading to the new iPhone. I currently have a family talk plan with AT&T and have unlimited data. I am the only one on my account who plans on upgrading to the

  • Swap file in use after 12 minutes uptime

    Hi I noticed this a little bit of a strange behavior recently. Once I power my Mac up, the amount of free memory is around 1.34 GB, as I don't have many startup items. Then I launch Skype and torrent client (µTorrent or Transmission) and wait about 1