Help needed: modeling master-detail relationship using Object types

I would like to use object types to model a master-detail relationship. For e.g.
create or replace type detail_t as object
(id number,
name varchar2(20)
create or replace type details_t as
table of detail_t
create or replace type master_t as object
(id number,
name varchar2(20),
details details_t
If I don't use database object-tables, how can I return multiple master rows of the type above from a PL/SQL procedure? Can I return a cursor of some sort?
I'm using Oracle 8.1.7.
Thanks,
Niranja

Niranjan,
After the object types are defined, your data would come from either object tables or object views. In your case, to get multiple master rows, simply query the object view.
Regards,
Geoff

Similar Messages

  • Visualize master-detail relationships using SQL Edge 1.2

    SQL Edge 1.2 released by Bay Breeze Software (http://www.baybreezesoft.com) is an Eclipse Rich Client application that allows users to execute SQL queries, browse schema information, and visualize master-detail relationships.
    With SQL Edge, users can use only one query to retrieve data in a master table, and then browse data in all related detail tables. Users can also insert, edit, and delete table records in the data grids.
    SQL Edge has four perspectives. The Query Perspective allows users run any SQL queries, while the Schema Perspective displays table schema information. There are two relationship perspectives. The Relationship Table View displays data in the master-detail style. The Relationship Tree View displays master table records as top-level tree nodes. The nodes can be expanded to reveal any level of related detail records. In addition, clicking any node will display the corresponding data in a detail grid.
    The following summarizes SQL Edge's major features:
    (1) Support any JDBC compatible databases.
    (2) Allow users to specify JDBC drivers at run-time, and provide wizards to help setup JDBC connections. Easy to install, and easy to setup.
    (3) SQL editor with syntax highlighting based on currently connected databases.
    (4) SQL edtior allows users to execute SQL queries asynchronously. Users can cancel the execution by click the "Cancel" button or just close the SQL Editor.
    (5) Schema perspective displays the table schema information, including column definitions, primary key, indexes, and foreign keys.
    (6) Relationship table view displays the related data in master-detail style, with master table data shown in the top grid, and all related detail table data in a list of bottom grids.
    (7) Relationship tree view displays the master table records as top-level tree nodes, and the related detail records as child nodes. Click any of these tree nodes will display the corresponding record data in a detail grid.
    (8) Allow users to insert, edit, and delete records in the master and detail grids of the relationship table view and relationship tree view.
    (9) Allow users to define master-detail relationships even between tables in different databases. This enables the relationship table view and relationship tree view to display data relationships between tables in different databases or without pre-defined foreign keys.

    Hi, Martin.
    Maybe you don't need a master detail relationship. Do you need to do changes in your detail block, or just queries?
    If just queries, you can create your second block based on a From-Clause Query, and change the QueryDataSourceName property with a When-List-Changed trigger in your T-List.
    I know this is a little vague but, without knowing what you need to do in the second block, I'm afraid to tell you more.
    Feel free to mail me directly, if you need some pointers about Forms.
    Pedro

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

  • Create Operation for Master-Detail Relationship Using Composite Association

    My requirement is to insert record for both the master and the detail at the same time using a single create insert action.I was successful in doing so using the composite association but when I am trying to commit the new record, I am getting the error that for the primary key Null value cannot be inserted.Then, I made the PK for both the master and detail EO's as DBSequence type which resolved the issue.
    My query is , Is there any alternative way to fulfill my requirement by "NOT" using the type for primary key to be DBSequence type?
    Thank you for your help.

    I also want to insert into master detail table in single form but when I insert in master form and then go to detail form for inserting value the master data automatically loss when I press detail create insert button. I am Using Two create insert button one for master and one for detail.
    I have also tried this function for solving my problem in other way but the problem is same
    public String cb8_action() {
    // Add event code here...
    BindingContainer bindings =BindingContext.getCurrent().getCurrentBindingsEntry();
    //OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
    //Object result = operationBinding.execute();
    OperationBinding operationBinding1 = bindings.getOperationBinding("CreateInsert1");
    Object result1 = operationBinding1.execute();
    if (!operationBinding1.getErrors().isEmpty()) {
    return null;
    return null;
    Please Help me.

  • Help needed in Master Detail Form - 2 level of details

    Hi,
    I have a form with 2 levels of Master Detail and a Find window
    The Datablocks are
    - Batch
    - Headers
    - Lines
    - Manual datablock for Find Wndow
    I have created relation between Bacthes and Headers with Batch Id
    I have created relation between Headers and Lines using HeaderId.
    The issue is that,
    If I search with '%' in Batch block, by default it will show results in 'Headers' and 'Lines' block.but if i navigate to the next record in batch block , only Headers block shows results but Lines block does not show result.
    If I search from Find window also, only Batch and Headers block shows results but Lines block will be empty.
    In the 'Batch' block if I search with specific data , the screen shows results in 'Headers' and 'Lines' block.
    Can you please help me solve it.
    I have written a PRE-QUERY on Batches block to set where clause from Find window.
    I have written a PRE-QUERY in Headers block to set where clause from Find window
    Thanks,
    Kamath.
    Thanks,
    Gowtam

    Hi,
    When you execute normal not by searching through ENTER_QUERY mode. Then data is coming in all blocks
    - Yes. Once I go to the Form if I search using '%' in batch block or search for a particlaur record i Batch block, the results shows up in Headers and Lines block.
    Ex: say there are 2 records in Batch block(A and B) and I search by %, by default i get 1 batth record (A) and corresponsding headers and lines
    now when i use down arrow key in the batch block, second record(B) will be showed in batch block. relevant Headers block records will be shown but Lines block does not get queried.
    Similarly if coem to the Form from search window then also, Batch and Header blcoks wil be shown but not Lines block
    PREQUERY at Batch Level_*
    V_WHERE := 'WHERE 1 = 1';
    IF :XXYH_ICAN_CALC_WB_FIND.PERIOD IS NOT NULL THEN
         V_WHERE :=      V_WHERE || ' AND PERIOD = '''||:XXYH_ICAN_CALC_WB_FIND.PERIOD||'''';
    END IF;               
    IF :XXYH_ICAN_CALC_WB_FIND.BATCH_ID IS NOT NULL THEN
         V_WHERE :=      V_WHERE || ' AND BATCH_ID = '''||:XXYH_ICAN_CALC_WB_FIND.BATCH_ID||'''';
    END IF;
    IF      V_WHERE IS NOT NULL THEN
         set_block_property('XXYH_ICAN_WB_BATCHES',DEFAULT_WHERE,V_WHERE );                          
    END IF;     
    PRE-QUERY at Header Level_
    IF :XXYH_ICAN_CALC_WB_FIND.BATCH_ID IS NOT NULL THEN
         V_WHERE :=      V_WHERE || ' AND BATCH_ID = '''||:XXYH_ICAN_CALC_WB_FIND.BATCH_ID||'''';
    END IF;
    IF      V_WHERE IS NOT NULL THEN
    set_block_property('XXYH_ICAN_WB_TRX_HEADERS',DEFAULT_WHERE,V_WHERE );
    END IF;     
    Thanks,
    kamath.

  • IMPDP Help needed please...ORA-39083: Object type PROCOBJ failed to create

    OS=Win2003
    DB=10gR2
    Version = 102.0.4
    Hi,
    I am running a impdp on a 30gb file and well it seems to have gone fine (much faster then it normally does to be honest), but towards the end it fails, and when researching this error, it seems to be very vague and I was wondering if someone can help me. Below is the log, but I have taken parts out of it that are not relevant.
    Import: Release 10.2.0.4.0 - Production on Wednesday, 16 April, 2008 15:22:18
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Master table "SYSTEM"."IMPGEMDEV041608" successfully loaded/unloaded
    Starting "SYSTEM"."IMPGEMDEV041608": system/********@iworksdb directory=DATA_PUMP_DIR dumpfile=expdpgemdev.dmp job_name=impgemdev041608 TABLE_EXISTS_ACTION=APPEND SCHEMAS=GEMDEV LOGFILE=IMPIWORKS_BOON.log REMAP_SCHEMA=GEMDEV:IWORKS REMAP_TABLESPACE=IWORKS_INDEX:IWORKS_IDX REMAP_TABLESPACE=IWORKS_IOT:IWORKS_IDX REMAP_TABLESPACE=IWORKS_TABLES:IWORKS_TABLES EXCLUDE=GRANT exclude=statistics STREAMS_CONFIGURATION=N
    Processing object type SCHEMA_EXPORT/USER
    ORA-31684: Object type USER:"IWORKS" already exists
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
    Processing object type SCHEMA_EXPORT/ROLE_GRANT
    Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
    Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
    Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
    Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
    ORA-31684: Object type TYPE:"IWORKS"."T_NUMBER_TAB" already exists
    ORA-31684: Object type TYPE:"IWORKS"."T_VARCHAR2_TAB" already exists
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    ORA-39152: Table "IWORKS"."SYS_TOKENTYPE" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
    ORA-31684: Object type PACKAGE:"IWORKS"."CONT_FEE_DEF_UC" already exists
    ORA-31684: Object type PACKAGE:"IWORKS"."COPAYCALCFLAG" already exists
    ORA-31684: Object type VIEW:"IWORKS"."VWTREE" already exists
    ORA-31684: Object type VIEW:"IWORKS"."V_ROUTE_DTL_GROUP" already exists
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
    Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
    ORA-39083: Object type PROCOBJ failed to create with error:
    ORA-06550: line 2, column 11:
    PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "VARCHAR2" to continue.
    ORA-06550: line 3, column 12:
    PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "VARCHAR2" to continue.
    ORA-06550: line 4, column 19:
    PLS-00103: Encountered the symbol "VARCHAR
    ORA-39083: Object type PROCOBJ failed to create with error:
    ORA-06550: line 6, column 16:
    PLS-00103: Encountered the symbol "RAYSQLACCESS9889405" when expecting one of the following:
    * & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
    LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
    The symbol "* was inserted before "RAYSQLACCESS9889405" to continue.
    ORA-06550: line 7, column 17:
    PLS-00103: Encountered the symbol "SQL" when expectin
    Job "SYSTEM"."IMPGEMDEV041608" completed with 2831 error(s) at 15:30:37
    Any help will be much appreciated

    I can not seem to find any object named PROCOBJ.
    As for the object called RAYSQLACCESS9889405...no idea what this is.
    I checked the source for any invalid objects and none.

  • Facing java.lang.ClassCastException: DummyPagePhaseListener cannot be cast to oracle.adf.model.RegionController while am using master detail relationship by af:table

    Hi friends,
         We are in to new development in Oracle ADF and newbie to this technology.
         Created .jsf page and in corresponding pagedef, has "ControllerClass" with refering "DummyPagePhaseListener" and we have master-detail relationship using Viewlink(created using a SQL Query and  entity based view).
        Below exception raised when navigating from one  to another record in Master af:table. Any help will be appreciated. Thanks in Advance......
    java.lang.ClassCastException: DummyPagePhaseListener cannot be cast to oracle.adf.model.RegionController
    at oracle.adf.model.binding.DCBindingContainer.getRegionController(DCBindingContainer.java:5197)
    at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4247)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.validateModelUpdates(PageLifecycleImpl.java:300)
    at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.validateModelUpdates(FacesPageLifecycle.java:70)
    at oracle.adf.controller.v2.lifecycle.Lifecycle$6.execute(Lifecycle.java:202)
    at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$600(ADFPhaseListener.java:23)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$3.after(ADFPhaseListener.java:323)
    at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:75)
    at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:447)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

    Hi timo,
    Thanks for ur reply...
    we are using unbounded taskflow.
    In Controller class(page def file), we refered the class that implements PagePhaseListener
    The following override methods has created
      public void afterPhase(PagePhaseEvent pagePhaseEvent) {
    //In this area we used to read the session object file which is written and sent by another application(application to application navigate).
    If session object file exists,will allow the user to navigate into the requested page else will navigate in to login(security aspect).
      public void beforePhase(PagePhaseEvent pagePhaseEvent) {
    Is we used Controller class wrongly ???
    Is there any relationship with region controller???
    Mani
    [email protected]

  • Problem using rollback in master-detail relationship

    Hello,
    I have an odd error using master-detail relationship, for example: countries and states. This is the problem:
    I have 3 pages:
    Page A: Read-only table of countries
    Page B: Read-only table of states
    Page C: State form
    and the flow:
    1. In the page A, select a country and click button to go to the states page
    2. In the page B, select a state and click detail button to go to the state form page
    3. In the page C, edit something and click rollback button. The rollback button's action goes to the page B
    4. In the page B, the states table is empty but I expected the table contains the same states those were in the step 2
    I know it's a bit difficult to understand but I hope someone can help me.
    Thanks, edwin.
    Edited by: user13259215 on Jun 19, 2012 10:44 PM

    On invoking Rollback the whole of AM is refreshed and hence all VOs are refreshed. The first row in all VOs is selected by default. You will need to retain the VO row selections on your own. Check this thread for ideas.
    Stay on previous or next row on rollback.

  • ESB problem when use merge function in master/detail relationship

    I have some problem with the merge function in database adapter.
    details:
    I have 2 tables in master/detail relationship, both have GUID column as a primary key (GUID generated by ESB).
    'car_group' table
    pk : guid
    unique : group_no, datadate, datatime
    ===============================
    guid, group_no, datadate, datatime, group_detail
    ===============================
    1, 1, 01/01/2008, 09:00, groupdetail01
    2, 1, 01/01/2008, 10:00, groupdetail02
    'car_group_detail' table
    pk : guid
    fk : car_group_guid link to car_group.guid
    ==================
    guid, car_group_guid, detail
    ==================
    1, 1, detail01
    2, 1, detail02
    3, 2, detail03
    4, 2, detail04
    I used a file adapter as a input, here is an example text file
    M, 1, 01/01/2008, 09:00, groupdetail01
    D, detail01
    D, detail02
    M, 1, 01/01/2008, 10:00, groupdetail02
    D, detail03
    D, detail04
    Because I used merge function so I need to specify the columns that will be a condition for the insert/update,
    but I have generate GUID as a primary key in the tables, I can't used it, so in toplink I map my unique key as a primary key.
    The insert operation work fine but when update is required (for example, try to change 'group_detail' column of the master table in text file),
    an SQLException thrown, the log file shown the adapter try to update the GUID column of master table but the constraint not allowed.
    And yes, cause of GUID generate everytime so ESB try to update this column also, but I don't want to do like that, I need something
    like when update operation required, just ignored the GUID column.
    I try to mark read-only to the GUID column in Toplink mapping file but still have the same problem, it still generate UPDATE statement
    with the GUID column, and also I try to let the database trigger to generate GUID instead of ESB function, but it not works in master/detail
    relationship (I think the Toplink manage the relationship, is it right ?)
    Please advise, thanks for advance.

    somebody please help, thanks !!!

  • BC4J - To get the detail of details in a Master-Detail relationship

    Hi,
    I am developing an application in JDev using Buss Components for Java.
    I need to show the details from the details in a Master-Detail relationship of ViewLink Objects.
    e.g I am browsing through a list of book publishers, if I pick one book publisher, all the books published by this publisher should be displayed. And when I pick one book out of these, the list of buyers should appear for this book.
    Is it possible to do it via the wizards in JDev?
    If not, is their any other way of doing it?
    Thanks,
    Any help would be appreciated.
    null

    Sure. Arbitrary levels of master/detail are easy to handle. It's just the first time you set it up in the "Data Model" panel of your Application Module, the UI gestures may not be the most obvious.
    Depending on whether you need to just browse the data, or both browse and update it, you would decide whether or not you need underlying Entity Objects for Publisher, Book, and Buyer.
    To keep it simple, just assume you want to browse so the Entity Objects are not required to be involved.
    You would develop three View Objects:
    [list=1]
    [*]Publishers - with a query like SELECT publisher_name, publisher_id FROM PUBLISHER ORDER BY publisher_name
    [*]Books - with a query like SELECT title, isbn FROM book ORDER BY Title
    [*]Buyers - with a query like SELECT name, company FROM buyer ORDER BY company, name
    [list]
    Then, you define two View Links:
    [list=1]
    [*]BooksFromPublisher - linking the Publishers view to the Books view, and
    [*]BuyersForBook - linking the Books view to the Buyers view
    [list]
    Then, you define an Application Module that sets up the data model you want to work with in a particular application that reuses these reusable view object and view link components.
    On the "Data Model" tab, you'll see the master/detail views available in the "Available" list like this:
    - Publishers
    |
    +- Books
    - Books
    |
    +- BuyersTo construct a master/detail/detail view with these "raw ingredients" do the following:
    [list=1]
    [*]Click on Publishers in the Available list, and click (>) to shuttle it into the data model
    [*]In the data model tree, select the Publishers view to make it the active selection.
    [*]Back in the Available list, click on the Books view that is indented under Publishers and click (>) to use Books as a detail of the current view in the data model.
    [*]In the data model tree, select the Books view to make it the active selection.
    [*]Back in the Available list, click on the Buyers view that is indented under Bookss and click (>) to use Buyers as a detail of the current view in the data model.
    [list]
    Hope this helps.
    null

  • Master-Detail Relationship problem

    I've spent 1.5 days already trying to solve this problem. I'm creating a JClient application using BC4J with a Master-Detail relationship. The relationship between tables is a many-to-many thru an intersection table. I've gotten my master and detail data to show with columnar form data in the top(master) panel and table data in the lower(detail) panel. My problem is that each time I get a master record that contains more than one detail record, each time I click the next navigation button in the master pane it will remain on the master record for the number of detail entries. For example, if a master record has 3 children, then I must click the next button 3 times to move to the next master record. I know that it has something to do with the way the entities are joined but I can't figure out how to join them any other way. Can anyone give me a hint how I can make the master panel only show one record for each Master-Detail relationship (even though the intersection table says its a many-to-many)?
    Thanks,
    Mark

    Apparently, I was making things much more complicated than they needed to be (rather, JDev was). My first attempt at MD relationships, I followed the examples in the help files. JDev created VO's, Entities, Assoc's, View Links, etc... Everything but the kitchen sink! After researching a bunch more, I found that the only thing I needed to do was to create my view objects to display exactly what I wanted to see in my panel regardless of whether it was a parent or a child. Once I had the view objects straight, then I could connect them using a view link and JDev handled the rest. Pretty slick but, I wish there was some better documentation. My next problem is that I'm trying to make this a Master-Detail-Detail-Detail window. The master needs to be a JComboBox, displays only a date, and needs to appear in the same panel as it's child. The 1st child will have a navbar that cycles through a bunch of orders based on the date from the combo box. The order panel's child is in the lower panel and displays the order detail items. It also has a navbar. The lower detail panel needs to have a split pane with the upper part showing the order detail and the lower part showing the materials used in making up that order detail item.
    So far, I've got the first 3 parts done (ie. combobox, orders, and details). For the combobox, I used a JComboBox navigationbinding. It shows the correct date, but my control is always disabled. I can't figure out why the combobox is always disabled. The enabled property is set to true. Anbody have any clues?
    Thanks,
    Mark

  • Displaying a Master Detail Relationship in a Panel Accordion or Tabs

    Hi,
    Is it possible to display a Master-Detail relationship in a Panel Accordion or Panel Tab or other component that visually divides the display?
    Say I have a Department - > Employees master detail relationship and I want each tab in my accordion to represent each
    departments and when I clicked the tab, the list of employees associated with that department is displayed.
    I am exploring this idea but I cant get to find a resource on how to move forward. I am using JDev 11.1.1.4. Thanks

    Hello,
    I recently faced the same problem and did not find a clean solution either. So I implemented it a bit more "dirty". :-)
    Instead of using the Department > Employee view link, I just created a new view object (say EmployeesFromDept), that has a bind parameter called p_DeptId:
         SELECT ...
         FROM   EMPLOYEES e
         WHERE  e.DEPARTMENT_ID = :p_DeptIdThe Data Control of this VO will have an ExecuteWithParams operation that takes the department id as input. Create an action binding in your page definition that binds to this operation, called "RefreshEmployeesForDept":
         <action IterBinding="EmployeesFromDeptIterator" id="RefreshEmployeesForDept"
                InstanceName="MyAMDataControl.EmployeesFromDept"
                DataControl="MyAMDataControl" RequiresUpdateModel="true"
                Action="executeWithParams">
          <NamedData NDName="p_DeptId" NDValue="" NDType="java.lang.String"/>
        </action>In your page, add the current DepartmentId to each showDetailItem using an attribute and add a disclosureListener:
         <af:iterator id="i1" value="#{bindings.Departments.collectionModel}" var="row">
                <af:showDetailItem text="#{row.DepartmentName}" disclosureListener="#{pageFlowScope.myBean.toggleDisclosed}">
                   <f:attribute name="currentDepartmentId" value="#{row.DepartmentId}"/>
                              <af:table value="#{bindings.EmployeesFromDept.collectionModel}" var="row"
                          rows="#{bindings.EmployeesFromDept.rangeSize}"
                          emptyText="#{bindings.EmployeesFromDept.viewable ? 'No data to display.' : 'Access Denied.'}"
                          fetchSize="#{bindings.EmployeesFromDept.rangeSize}"
                          rowBandingInterval="0" id="t1">
                   //Lots of mapping column here
                        </af:table>
                </af:showDetailItem>
         </af:iterator>Now each showDetailItem that is generated knows the DepartmentId it "belongs to". In the toggleDisclosed(DisclosureEvent disclosureEvent) method, first fetch this attribute, so that you know the dept id of the showDetailItem that was clicked. Next, programmatically call the RefreshEmployeesForDept action binding if the current event is "disclosing the showDetailItem":
         public void toggleDisclosed(DisclosureEvent disclosureEvent) {
              String currentDepartmentId = disclosureEvent.getComponent().getAttributes().get("currentDepartmentId").toString();
              if(disclosureEvent.isExpanded()){
                   DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                   OperationBinding operBinding = bindings.getOperationBinding("RefreshEmployeesForDept");
                   if(operBinding != null){
                        operBinding.getParamsMap().put("p_DeptId", currentDepartmentId);
                        operBinding.execute();
        }Now, each time a showDetailItem is opened, the bind variable of the iterator belonging to your list of Employees will be refreshed with the correct DepartmentId. Ie the department that the showDetailItem represents.
    Hope this helps! If you find a cleaner solution, please let me know. :-)
    Regards,
    Chris

  • Is it possible to display records without master detail relationship?

    Hi all,
    I've a form for importing excl to oracle with column mapping. i.e I've display excl column heading on the form.
    In front of each excel column heading I've provide a list item which contains table column heading so user can map his excl column with table column and according to data gets insert into the database table.
    There are 28 excel and table column headings on the form every time user will have to map the column. Its very time consuming job. That's why I've decide to provide template to user. e.g user maps the excl column with table column only first time, then this combination is saved as 'template 1' . when user runs the form next time he/she needs to just select template-1 from lov. and that template get displayed on the forms field. Then user will press the process button and data gets inserted into respective table
    Now I've created two tables
    1. mst_template
    template_name        varchar2(100) ---primary key.
    2. template
    template_name   varchar2(100) --- foreign key (ref. tempalte_name - mst_template)
    ex_col                varchar2(100)
    tb_col                varchar2(100)Now my problem is, I try the master detail relationship but it doen't works becase on my form the condition is
    excel col                                   table col
    excl_col1                                 Tab_col1
    excl_col2                                  tab_col2
    excl_col28                                Tab_col28       i've establish the master detail relationship but getting error
    FRM-40505:ORACLE error:unable to perform query. as i use excl_col1, tab_col1.. etc
    can i achieve it by using cursor? without using master detail relationship. My 90% coding is done. only thing remaining is to display records on form. so can i use cursor in this situation? and how? I've work so hard on it and lot of time is spend too so i don't want to change the coding of the existing form. any suggestion for this problem.
    please help
    Regards
    sam.

    Turning on Closed Captioning is all you can do.  I think the problem you have is that not all movies have closed captioning.

  • Master-Detail relationship and querying back from the detail block

    Hello friends,
    Using oracle forms 6i. I have a multi data block. On the block there is a header and detail section. There is master detail relationship present in these blocks. I have a sequence defined, which generates an auto-number.
    Now in the detail section say I have 4 records all of which are say invoices and I am populating the details about it. On the 'save' button I have defined a logic which generates an auto- number or a unique number for all the 4 records in the detail section. The unique number is shown in the header section in a text-field.
    Now when I query (F11 and then Ctrl+F11) with the help of the unique number i see all the 4 records under it in the detail section. But when I query with the help of one of the 4 records in the detail section it says "fetching more than a single row." I know the same unique number is there for all the 4 records and in the header section I am displaying "number of items displayed" to be 1. That is why the error. But I want that to remain one. How exactly can I develop this functionality of querying the unique number in the header section from the detail block?
    Please help as soon as possible.

    Hi,
    I'd suggest to check this tutorial:
    http://www.oracle.com/technology/obe/obe_as_10g/bi/forms/formsmasterdetailobe.htm
    Having a relationship between data blocks, coordinates dml actions in both, so no coding is needed to save/update/delete records, forms built-ins do the work.
    hope this is useful,
    Hugo

  • Master Details relationship

    I have an application where I need to have master detail relationship. I have seen a demo ( dept-emp ) but my requirements are slightly different from this demo.
    Just to simplify it, I have these fields in the SD_SOWS which acts as MASTER table and it has SOW ID as primary key.
    And I have 2 detail tables. One is used to hold all the handsets (SD_SOW_HANDSETS ) and the other one is to hold all the platforms ( SD_SOW_PLATFORMS ) . And they both are tied up using SOW_ID column ( this is the fk ).
    The problem arises when I added a new SOW and I have assigned SOW ID with the new value automatically by changing SOURCE to SQL Query and run this statement below :
    SELECT NVL( NEXTVALUE ,1)
    FROM (SELECT MAX(SOW_ID) + 1 NEXTVALUE
    FROM SD_SOWS
    But
    1) when I added the one of detail tables ( SD_SOW_HANDSETS ) , this new SOW ID doesn't get carried forward to SOW ID column of this detail table (it becomes blank )
    2) If I entered this column manually ( assuming I use the same number as the one in MASTER table -SD_SOWS ) and I have it saved , it throws exception
    ORA-02291: integrity constraint (DSSMASTER.FK_SOW_HANDSET_SOWID) violated - parent key not found
    I know the reason is that I haven't confirmed and saved the master table yet but I was wondering if HTMLDB can create a dummy SOW ID in the MASTER table and save it temporarily in db where it allows the children / details to reference the same number.
    any ideas ?
    Dony

    I'm always getting the same details for all masters rows. any idea what could it be ? Sounds like you didn't set the Block.Query Data Source Arguments property so that your Master block key values are not getting passed to your "Query" procedure. You will need to create a parameter to your procedure for the key value as well. Did you use my Demo or My Oracle Supports? If you used my demo, you will need to modify the EMP_SELECT procedure to accept the DEPT_NO as a parameter and then adjust your query to use the parameter.
    If you used My Oracle Supports demo (doc ID 66887.1) then look at Example B. Multi-Block operations with Master-Detail relationship. It shows you how to write the query procedure to accept additional parameters.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

Maybe you are looking for

  • How do I turn turn off the right pane in Adobe Reader XI?

    I have been using Adobe Reader since 2007, and recently I have been unable to turn off the right pane while reading. If anyone knows how I can deal with this problem, I would really appreciate it. Thanks Don Randall

  • Fieds are not appearing in rss3

    HI experts, we have added 2 fields ( one char nd one kf). activated ds , structure everythng. Filled setup tables. Aftr that i cant see them in rsa3. Chekd in lay out also . What is the reason???? awaiting your reply. br, RAvi

  • Order Import after PO Inbound via XML Gateway Error

    I am using Apps Adapter (11g) to connect to EBiz Suite 11.5.10. I am doing PO Inbound and using XML Gateway to create the sales order. Even though I am populating order type in <POTYPE> under the <POORDERHDR>, during order import, I keep getting the

  • GD80 Status LED and System Suspend problem

    Hi everyone. My hardware: - MSI P55-GD80 -BIOS AMI v1.4 -Intel Core i7 860 -OCZ 4GB (2x2GB) 1600MHz CL8 Gold Low-Voltage -Zotac GeForce GTX 275 896MB - PSU: Corsair TX850W -HDD : 1- Seagate Barracuda 7200.12 250GB (ST3250318AS); 2 - Seagate Barracuda

  • Hi need help from Mac Guru

    Firefox doesn't know how to open this address, because the protocol (rtmp) isn't associated with any program. i need to open this address from safari or firefox or any other Software "rtmp://127.0.0.1/videowhisper" but it doesn't get loaded. i got th