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.

Similar Messages

  • Change View Link SQL dynamically

    Hi,
    How i can modify the View Link SQL dynamically?
    I have View Link CategoryVL and it is working fine with master (CategoryVO) & details (CoursesVO) tables and the two VO's are not based on EO. but i want to add more columns to the View Link SQL in PFR.
    Please advicse.
    thanks in advance.
    Regards....Ashraf

    Hitesh,
    This a very generic case and happens when the source VO join attribute and destination VO join attribute are not of same type, i.e. data type and data length. Make sure that is happening in your case, this will solve your problem.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • 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.

  • [SOLVED] Multiple Dynamic View Objects and View Links - ADF Tree Table

    Hi all,
    I've got a method that creates 3 dynamic viewobjects using this:
                ViewDefImpl Level1ViewDef = new ViewDefImpl("Level1View");
                Level1ViewDef.addViewAttribute("LevelDescription","LEVEL1_DESCRIPTION",String.class);
                Level1ViewDef.addViewAttribute("SetOfBooksId","SET_OF_BOOKS_ID",Number.class);
                Level1ViewDef.addViewAttribute("CodeCombinationId","CODE_COMBINATION_ID",Number.class);
                Level1ViewDef.addViewAttribute("Level1","LEVEL1",String.class);
                Level1ViewDef.addViewAttribute("AccountType","ACCOUNT_TYPE",String.class);
                Level1ViewDef.addViewAttribute("PeriodYear","PERIOD_YEAR",Number.class);
                Level1ViewDef.addViewAttribute("PeriodNum","PERIOD_NUM",Number.class);
                Level1ViewDef.addViewAttribute("PeriodName","PERIOD_NAME",String.class);
                Level1ViewDef.addViewAttribute("PtdActual","PTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("YtdActual","YTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("LtdActual","LTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("BudgetName","BUDGET_NAME",String.class);
                Level1ViewDef.addViewAttribute("BudgetVersionId","BUDGET_VERSION_ID",Number.class);
                Level1ViewDef.addViewAttribute("PtdBudget","PTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("YtdBudget","YTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("LtdBudget","LTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("EncumbranceType","ENCUMBRANCE_TYPE",String.class);
                Level1ViewDef.addViewAttribute("EncumbranceTypeId","ENCUMBRANCE_TYPE_ID",Number.class);
                Level1ViewDef.addViewAttribute("PtdCommitment","PTD_COMMITMENT",Number.class);
                Level1ViewDef.addViewAttribute("YtdCommitment","YTD_COMMITMENT",Number.class);
                Level1ViewDef.addViewAttribute("LtdCommitment","LTD_COMMITMENT",Number.class);
                Level1ViewDef.setQuery(sql_level1);
                Level1ViewDef.setFullSql(true);
                Level1ViewDef.setBindingStyle(SQLBuilder.BINDING_STYLE_ORACLE_NAME);
                Level1ViewDef.resolveDefObject();
                Level1ViewDef.registerDefObject();
                ViewObject vo1 = createViewObject("Level1View",Level1ViewDef);I can create the view objects fine and create a single viewlink between two of them, however i'm getting problems with 2 view links.
    This is how I'm creating a view link:
                ViewLink Level2Level1FKLink = createViewLinkBetweenViewObjects("Level2Level1FKLink1",
                                                        "Level2View",
                                                        vo1,
                                                        new AttributeDef[]{
                                                          vo1.findAttributeDef("Level1")
                                                        vo2,
                                                        new AttributeDef[]{
                                                          vo2.findAttributeDef("Level1")
                                                        "LEVEL1 = :Bind_Level1");
                ViewLink Level3Level2FKLink = createViewLinkBetweenViewObjects("Level3Level2FKLink1",
                                                        "Level3View",
                                                        vo2,
                                                        new AttributeDef[]{
                                                          vo2.findAttributeDef("Level2")
                                                        vo3,
                                                        new AttributeDef[]{
                                                          vo3.findAttributeDef("Level2")
                                                        "LEVEL2 = :Bind_Level2");I can get the data to display on an adf tree table if i'm only using a single view link, but when i try and implement 2 view link (for 3 levels on the adf tree table) i'm getting problems displaying the data.
    I'm getting the following error:
    Aug 10, 2007 2:44:39 PM oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer encodeAll
    SEVERE: Error during partial-page rendering
    oracle.jbo.NoDefException: JBO-25058: Definition Level3View of type Attribute not found in Level2View_Level2Level1FKLink1_Level2ViewThe thing is, Level3View isn't in the Level2Level1FKLink viewlink.
    I've been reading about something similar here
    BC4J Master-Detail-Detail
    but I am still unsure of what the problem is.
    Thanks in advance.

    I found the answer here:
    http://radio.weblogs.com/0118231/stories/2004/06/10/correctlyImplementingMultilevelDynamicMasterDetail.html

  • View link between calculated attributes

    Hi all,
    I'm having a problem with a view link. See, I'm linking two view objects on attributes that are calculated. The two view objects are result of sql query (not EO based) - plus, this attribute is present in the SQL query and in the db table for both view object.
    The SQL query is like, for both view object :
    select to_char(DATE_FO, 'dd/MM/yyyy), a, b, from ...
    And, as I said, I made a view link on these attributes. The cardinality is 1 to *.
    When testing the ApplicationModule, I'm getting
    (oracle.jbo.SQLStmtException) JBO-27122: SQL error during statement preparation. SELECT ....... ) QRSLT WHERE DATETOCHAR = :Bind_ToCharGdaCrahDateCrahDdMm
    ----- Level 1: Detail 0 -----
    (java.sql.SQLException) ORA-00904: "DATETOCHAR" : identificateur non valide
    DATETOCHAR is the alias of the calcultated attribute in detail vo.
    Please help ! Also I've been reading Steve's article : urlhttp://radio.weblogs.com/0118231/2003/11/13.html[url] ; what is jbo.viewlink.consistent property exactly ?
    Regards
    Luc

    Hi again,
    ok I found it ... I needed to add an alias in the SQL query and override the default sql where clause in the view link. Something weird btw, because the alias in the sql query seems to be not bind to the alias property in the attribute properties... and it add another attribute. But it works fine.
    Therefore, if Steve muench might explain jbo.viewlink.consistent property, I'm stil interested in knowing that :)
    Luc

  • 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

  • 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.

  • Many to Many PL/SQL - how to nest a linking table?

    I have two objects that are linked with a many-to-many relations. These two objects have to be nested inside a third object. How should I do ?
    I created the type and the table for A, I did the same for B and I finally created the linking table for A and B. How shall I nest this table inside the object C?
    Thank you very much for your help as I am new to PL SQL.

    I need to create one object called Container. From a modelling perspective, this object has contains all the other objects.
    The other objects are items and composed items. The Container contains the items (it is a one-to-many relationships so I created a nested table) but it also contains composed items, which are items linked to parts and this is a many-to-many relationship. How do I do to include the many-to-many in the object container? I included question marks when I did not know. Thank you
    CREATE OR REPLACE TYPE Item_type (
    Id NUMBER (6),
    Type CHAR (7)) ;
    CREATE OR REPLACE TYPE Part_type (
    Id NUMBER (6),
    Type CHAR (7)) ;
    CREATE TABLE Item OF Item_type
    (Id NOT NULL,
    PRIMARY KEY (Id));
    CREATE TABLE Part OF Part_type
    (Id NOT NULL,
    PRIMARY KEY (Id));
    CREATE TABLE ComposedItems
    (ItemId REF Item_type ,
    PartId REF Part_type);
    CREATE OR REPLACE TYPE ComposedItems_nested as TABLE OF *????????*
    CREATE OR REPLACE TYPE Item_type (
    Id NUMBER (6),
    Type CHAR (7));
    CREATE OR REPLACE TYPE Item_nested as TABLE OF Item_type;
    CREATE OR REPLACE TYPE Container_type (
    Id NUMBER (6),
    Type CHAR (7),
    Item Item_nested,
    /

  • Defining Dimensions, Attribute Hierarchies for a Link Table(Many to Many)

    I have 3 Tables in the Database
    Table 1: Transactions (Fact Table) - PK(TransactionId)
    Table 2: Relationship (Dimension1) - PK(Relationship Id), FK_TransactionId, FK_CompanyId, RelationshipType
    Table 3: Companies (Dimension 2) - PK(CompanyId)
    Table 2: Relationship table is a link table between Transactions & Companies to facilitate many to many relationship. 
    I defined Fact and Dimension tables accordingly but having issues defining Dimension & Attributes for Relationship tables
    Relationship Dimension:
    I have 3 hierarchy groups defined
    Hierarchy 1 - Relation -Relationship Type,Relationship Id(PK)
    Hierarchy 2 - Transaction - Transaction, Relationship Id(PK)
    Hiearchy 3 - Company - CompanyId, Relationship Id(PK)
    Defined the attribute relationship in the following way
    RelationshipID(PK) ---> CompanyId , RelationshipID(PK) ---> TransactionId, RelationshipID(PK)
    ---> RelationshipTYpe
    I am getting incorrect results when I deploy the cube. Not all the types are being displayed only 4 types are being displayed out of 27 types though there exists Transactions for all the Types.
    To fix the incorrect results, I tried to break the Relationship Dimension into 2 dimensions seperating Transaction(Relationship Dim) & Company,Type (Companies Dim). I tried to configure a many
    to many Relationship type between my  Companies Dim & Fact Table Transaction. But I get the error that says 
    "Companies Dim many to many dimension in the Tansaction measure group requires that the granularity of the Relationship dimension is lower than that of the Relationship measure group "
    Any help regarding how to difine Dimensions & Attribute Hierarchies on a Many to many link table is appreciated.

    Hi Jaya,
    According to your description, you are experiencing the issue when implement many to many relationship by using a bridge table in your SQL Server Analysis Services project, right?
    Generally, a bridge table will have a surrogate key for the dimension and a surrogate key to the fact table or a degenerate dimension based on the fact table. Here are some blogs which describe how to implement many to many relationship using a bridge
    table.
    http://bifuture.blogspot.com/2011/06/ssaskimball-modeling-nm-relation.html
    http://www.sqlchick.com/entries/2012/1/22/data-modeling-tip-when-using-many-to-many-bridge-tables-in-s.html
    http://social.technet.microsoft.com/wiki/contents/articles/22202.a-practical-example-of-how-to-handle-simple-many-to-many-relationships-in-power-pivotssas-tabular-models.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • Create/update with Many-to-Many view

    Are views that are based on a many to many relationship read-only?
    In other words, with some row current in one DataSource (its view as one end of the many to many relationship) can I create a new row in the other DataSource (through its view object) and have the intersection table be updated automagically?
    Seems to simply insert a row into the other table without adding a row to the intersection table.
    If this is way off base, then how does the framework update the intersection table? Or how should I be updating the intersection table within the context of the framework?
    Thanks.

    Are views that are based on a many to many relationship read-only?
    In other words, with some row current in one DataSource (its view as one end of the many to many relationship) can I create a new row in the other DataSource (through its view object) and have the intersection table be updated automagically?
    Seems to simply insert a row into the other table without adding a row to the intersection table.
    If this is way off base, then how does the framework update the intersection table? Or how should I be updating the intersection table within the context of the framework?
    Thanks. Jared:
    It's not that the VO involved in a m-n link read-only. It's that the logic to populate the intersect table is currently missing.
    The way to get around this problem is as follows: Suppose we have m-n relationship between STUDENT, COURSE, and ENROLLMENT (ENTROLLMENT is the intersect table).
    1. Build an EO and a VO for the intersect table on the intersect table (ENROLLMENT).
    2. Build a view link between the 'detail' EO (say COURSE) and the intersect EO (ENROLLMENT). Build another one between master (STUDENT) and the intersect EO.
    3. In the application module, add ENROLLMENT VO as detail of multiple masters STUDENT and COURSE.
    If you need instruction on how to build multiple master for VO in an AM, please look at the OTN thread:
    Re: customized download function no longer working after last db recovery
    Search for 'multiple' in my posting (Sung Im).
    When you run this AM, you can select the desired STUDENT and COURSE. If you insert a new row into ENROLLMENT, you should see both StudentId and CourseId populated.
    Thanks.
    Sung

  • Filtered many-to-many Assoc/Link?

    Hi,
    quite new to ADF (UIX) but already in serious trouble ;-)
    I have 3 Entity Objects: Items, Audiovisuals and Images which map to 3 (different!) Tables. Strictly speaking Audiovisuals and Images are SubTypes of generell Items. But I decided not to implement the super-class-sub-class on entity level but on view level instead.
    (Items only contains primary keys)
    Based on those 3 entites are 3 view objects. Here AudiovisualsView and ImagesView inherit form ItemsView.
    For Items/ItemsView exists a many-to-many Assoc/Link to an Entity/View called Categories/CategoriesView.
    The Assoc is based on an intersection table.
    This intersection contains besides the two foreign keys another column with some number from a lookup, say 1, 2 and 3.
    Q1: how can I retrieve all Categories for an Item having e.g. 2 as number in the intersection? (just like filtering the retrieved Categories to some special attribute in the intersection)
    Q2: where do I have to place the code for this filtering? At the entity level or view level or ItemViewRowImpl?
    I supposes the signature must be something like "RowIterator getCategoriesView(int intersectionAttr)"
    Q3: at the level of UIX, how can I pass the parameter to getCategoriesView?
    Thanks in advance for any help, Christian
    p.s. my data control palette only shows methods exposed at the view level but does not show methods at the view row level. How can I bind methods exposed in the client row interface to my uix page?

    any hints?
    thanks, Christian

  • How many devices can I link to my I-cloud/I-match account?

    I have an I-cloud and I-match account with all my music on, most of which consists of my own cd's copied onto it.  I've just bought my mum an iPod nano 6th generation for her birthday and I want to put some music onto it for her so it's all ready to go.  I'm aware I can't put music I bought from I-tunes onto her device but can I copy my copied cd collection onto it for her?  I have 4 Apple devices already linked to my account.
    I'll be copying from a MacBook Pro to her device, then the rest of the time her downloads will be added on a Windows PC.  Is this possible/legal?  How many devices can you link to one iTunes account?
    Many thanks.

    For the main question:  http://www.apple.com/itunes/itunes-match/.
    You can authorize up to 10 devices on iTunes Match. 
    An iPod nano is not a device that works with iTunes Match so any music you put in it will have to go through itunes. Which means yes, you can put music you've bought from itunes on her device, as well as your imported music. That iPod won't count as one of the 10 devices either because it will not be using iTunes Match.
    Your plan might not go so smoothly if you plan on synchronizing the ipod to two different libraries.  You'd be safer importing any music you want to share with her from your library to her computer either by downloading with your own Apple ID or through another media (DVD,  external HD...) and authorizing.  And yes, this is legal, but you may only authorize a limited number of computers with your Apple ID:   http://support.apple.com/kb/HT1420?viewlocale=en_US&locale=en_US

  • In A3, How Do I Apply One Of My (many) Custom Metadata Views To The Viewer?

    In A3, it appears that both the Viewer and Browser are limited to just 2 views: Basic and Expanded.
    In A2, I had many custom metadata views that I could easily change via the Metadata-pane (now gone) in Prefs. depending on the type of workflow, customer needs, etc.
    Now, if I'm limited to just 2, I'll have to go in and manually change the composition of A3's 2 views for each workflow. If this is the case, I see it as a big step backwards. This is the type of limitation that iPhoto often has, and flexibility is what I expect from a Pro-App.
    I spent a great deal of time developing custom metadata views for various workflows so that I could align the various displays in Aperture to each workflow. What do I do now?

    Just stumbled over this thread:
    Yes, its the truth. There is no way to quickly change the display of Metadata in Browser or List View.
    You can tell from the form of the Settings - Window (Command - J) that there is no way anymore. You have one Standard View, and one Extended.
    Strange. I did not use it a lot, I always display pictures to customers with no metadata, except when we do a selection on site (and then its standard with only rating).
    wok4

  • JOIN for many-to-many linked tables?

    I have two tables, A and C, linked by a many-to-many intersection table B.
    I'd like to do a select from A with a LEFT OUTER JOIN to C for items mapped via B. A row in A may or may not have rows in C linked to it.
    I've tried to do a select using sub-selects but then I don't get the rows from A that don't have related rows in C.
    When I try to use the syntax of a LEFT OUTER JOIN I can't figure out how to link A and C via the B table.
    I would appreciate suggestions for how to approach this.
    Thanks in advance,
    George

    EXAMPLE
    SQL> L
      1  with A as (
      2  select 1 col1, 1 col2 from dual union all
      3  select 2     , 1     from dual union all
      4  select 3     , 2     from dual)
      5  ,
      6  B as (
      7  select 1 col2, 1 col3 from dual union all
      8  select 2     , 3     from dual)
      9  ,
    10  C as  (
    11  select 1 col3 from dual union all
    12  select 2      from dual union all
    13  select 3      from dual
    14  )
    15  select *
    16  from      A
    17  LEFT JOIN B ON (A.COL2=B.COL2)
    18* LEFT JOIN C ON (B.COL3=C.COL3)
    SQL> /
          COL1       COL2       COL2       COL3       COL3
             1          1          1          1          1
             2          1          1          1          1
             3          2          2          3          3

  • Long SQL statements that spans many lines

    Hi
    My major problem with JDBC is dealing with long SQL statements. Such statements normally are broken into lines to ease reading, for example:
    select column1, column2
    from table1, table2
    where table1.x = table2.y
    order by column1
    In java I should build this query into a String:
    String sql = "select column1, column2"+
    "from table1, table2 "+
    "where table1.x = table2.y "+
    "order by column1";
    The problem is -- you may not noticed, but this sql is incorrect, because there is no space before the from clause. This error will only appear when the program is run.
    Is there some technique to help writing sql statements that span many lines?
    Thanks
    Luis Cabral

    Another suggestion:
    Use constants for the parts you always use and set a blank at first and last position of the constant:
    final String SELECT_ALL_FROM = " SELECT * FROM ";
    final String WHERE = " WHERE ";
    better it happens that you have more than one space between two words than none.
    Ciao
    Kaethchen

Maybe you are looking for

  • The three main hurdles to porting existing Flash projects to iOS with AIR

    The purpose of this discussion is to identify significant problems currently preventing AIR for iOS from being a viable solution for porting existing Flash apps.  These issues have been largely ignored by Adobe, so I hope that everyone will add to th

  • Residual Clearing through F-44

    Hi Experts, I have passed one Credit entry in Vendor 7000001(TCode - FV60) of Rs.2310063(After TDS) Now i am clearing this credit balance using F-44. While clearing, i am putting Rs. 310063 in residual item. When i clicking 'post' icon, its giving fo

  • Can't drag clips from clip pane to build movie

    The clips in the clip pane turn grey when clicked (or opaque...not blue) and can't be dragged into the clip viewer. I can select them, edit them in the clip pane, but can't drag them. Help!

  • Word document compatibility

    I have been looking for an app on the iPad to view .dock ms word 2010 documents. Now I know there are a tone of them and safari does it too. I don't know about developing but my guess is they all call for the exact same function as safari does. Becau

  • Photo imports - file size inconsistencies

    I have lots of 60MB .tif files that I convert to .jpg before importing into the Starter Edition. I am getting confusing messages - sometimes it will let me import 4MB .jpg files and the next minute it will not import a 1MB .jpg files - says "File is