EJB 3 Problem: "Collections having FK in secondary table"

Hi,
working with EJB 3 first time, i have to develop my entites by a DB scheme. It is very complex and now I have the problem using composite FK / PK in many tables, so that a refenrenced key has as the same time both properties: FK / PK.
Example: +3 Tables: Mxx:={M_ID as PK},
Lxx:={M_ID as PK / FK from Mxx},
Zxx:={M_ID as PK/FK from Lxx}+
I have built Mxx.java, Lxx.java with @EmbeddedId from LxxPK.java (works) and the problem table Zxx.java with @EmbeddedId from ZxxPK.java which includes a reference key and same time primary key from Lxx.
How can I solve the problem of "having FK in secondary table"?
THX for your help!

I will specify my problem a little more:
I have an Entity named zuordnung_module_lv_ma this references an Entity lehrveranstaltungen.
In zuordnung_module_lv_ma :
@OneToMany
@JoinColumn(...)
public Collection<lehrveranstaltungen> lv = new ArrayList...
For more detailed information look at this:
my only problem is the table zuordnung_module_lv_ma
SQL:
create table BLOECKE
BLOCKID integer not null,
WOCHENTAG integer,
ZEIT_VON datetime,
ZEIT_BIS datetime,
LOGISCHGELOESCHT char not null,
constraint PK_BLOECKE primary key (BLOCKID)
create table CURRICULA
CURRICULUMKUERZEL varchar not null,
CURRICULUMBEZ varchar,
CURRICULUMID integer not null,
IDVERANTWORTLICHERSTUDIENDEKAN integer,
LOGISCHEGELOESCHT char not null,
constraint PK_CURRICULA primary key (CURRICULUMID)
create table LEHRVERANSTALTUNGEN
MODUL_ID integer not null,
LV_ID integer not null,
SWS double not null,
ART_LV char not null,
LOGISCHGELOESCHT char not null,
MAXTEILNEHMER integer not null,
constraint PK_LEHRVERANSTALTUNGEN primary key (MODUL_ID, LV_ID, ART_LV)
create table MITARBEITER
MA_ID integer not null,
TITEL varchar,
NACHNAME varchar not null,
VORNAME varchar not null,
AUFGELAUFENESWS integer,
LETZTESFORSCHUNGSFREISEMESTER varchar,
BEGINNANSTELLUNG date,
ENDEANSTELLUNG date,
MA_KUERZEL varchar not null,
GEBURTSDATUM date,
LOGISCHGELOESCHT char not null,
MA_KATEGORIE_ID integer,
constraint PK_MITARBEITER primary key (MA_ID)
create table MITARBEITERKATEGORIE
MA_KATEGORIE_ID integer not null,
MA_KATEGORIE_BEZ varchar not null,
constraint PK_MITARBEITERKATEGORIE primary key (MA_KATEGORIE_ID)
create table MODULE
MODUL_ID integer not null,
MODULKUERZEL varchar not null,
IDMODULVERANTWORLTICHER integer not null,
IDSTVMODULVERANTWORTLICHER integer,
CURRICULUMID integer,
ID_MODULGRUPPE varchar,
MODULNAME varchar,
PFLICHTFACH binary,
SEMESTER integer,
CREDITPOINTS integer,
LOGISCHGELOESCHT char not null,
constraint PK_MODULE primary key (MODUL_ID)
create table MODULGRUPPEN
CURRICULUMID integer not null,
ID_MODULGRUPPE varchar not null,
MODULGRUPPENBEZ varchar,
LOGISCHGELOESCHT char not null,
constraint PK_MODULGRUPPEN primary key (CURRICULUMID, ID_MODULGRUPPE)
create table ZUORDNUNG_MODUL_CURRICULUM
MODUL_ID integer not null,
CURRICULUMID integer not null,
LOGISCHGELOESCHT char not null,
constraint PK_ZUORDNUNG_MODUL_CURRICULUM primary key (MODUL_ID, CURRICULUMID)
create table ZUORDNUNG_MODUL_LV_MA_SEMINAR_EXEMPLAR
MODUL_ID integer not null,
LV_ID integer not null,
ART_LV char not null,
SEMESTER varchar not null,
MA_ID integer not null,
WOCHE_G_U char not null,
BLOCKID integer not null,
EXEMPLAR varchar not null,
LOGISCHGELOESCHT char not null,
constraint PK_ZUORDNUNG_MODUL_LV_MA_SEMIN primary key (MODUL_ID, LV_ID, ART_LV, SEMESTER, MA_ID, WOCHE_G_U, BLOCKID, EXEMPLAR)
alter table CURRICULA
add constraint FK_CURRICUL_ZURODNUNG_MITARBEI foreign key (IDVERANTWORTLICHERSTUDIENDEKAN)
references MITARBEITER (MA_ID)
on update restrict
on delete restrict;
alter table LEHRVERANSTALTUNGEN
add constraint FK_LEHRVERA_ZURODNUNG_MODULE foreign key (MODUL_ID)
references MODULE (MODUL_ID)
on update restrict
on delete restrict;
alter table MITARBEITER
add constraint FK_MITARBEI_ZUORDNUNG_MITARBEI foreign key (MA_KATEGORIE_ID)
references MITARBEITERKATEGORIE (MA_KATEGORIE_ID)
on update restrict
on delete restrict;
alter table MODULE
add constraint FK_MODULE_ZUORDNUNG_MITARBEI foreign key (IDMODULVERANTWORLTICHER)
references MITARBEITER (MA_ID)
on update restrict
on delete restrict;
alter table MODULE
add constraint FK_MODULE_ZUORDNUNG_MODULGRU foreign key (CURRICULUMID, ID_MODULGRUPPE)
references MODULGRUPPEN (CURRICULUMID, ID_MODULGRUPPE)
on update restrict
on delete restrict;
alter table MODULGRUPPEN
add constraint FK_MODULGRU_ZUORDUNG__CURRICUL foreign key (CURRICULUMID)
references CURRICULA (CURRICULUMID)
on update restrict
on delete restrict;
alter table ZUORDNUNG_MODUL_CURRICULUM
add constraint FK_ZUORDNUN_ZUORDNUNG_CURRICUL foreign key (CURRICULUMID)
references CURRICULA (CURRICULUMID)
on update restrict
on delete restrict;
alter table ZUORDNUNG_MODUL_CURRICULUM
add constraint FK_ZUORDNUN_ZUORDNUNG_MODULE foreign key (MODUL_ID)
references MODULE (MODUL_ID)
on update restrict
on delete restrict;
alter table ZUORDNUNG_MODUL_LV_MA_SEMINAR_EXEMPLAR
add constraint FK_ZUORDNUN_ZUORDNUNG_BLOECKE foreign key (BLOCKID)
references BLOECKE (BLOCKID)
on update restrict
on delete restrict;
alter table ZUORDNUNG_MODUL_LV_MA_SEMINAR_EXEMPLAR
add constraint FK_ZUORDNUN_ZURODNUNG_LEHRVERA foreign key (MODUL_ID, LV_ID, ART_LV)
references LEHRVERANSTALTUNGEN (MODUL_ID, LV_ID, ART_LV)
on update restrict
on delete restrict;
alter table ZUORDNUNG_MODUL_LV_MA_SEMINAR_EXEMPLAR
add constraint FK_ZUORDNUN_ZURODNUNG_MITARBEI foreign key (MA_ID)
references MITARBEITER (MA_ID)
on update restrict
on delete restrict;
THX for prospective comments!

Similar Messages

  • HT1414 is there another way i can fix this problem without having to restore my phone?

    my wifi settings is faded out so i cannot turn the wifi on. i followed the steps that this website said to do so it could get fixed but it didn't work.  then thet said i would have to restore my phone and i can't do that. is there another way i can fix this problem without having to restore my phone?

    No.
    A restore might not even fix it; a fair amount of the time, when the Wi-Fi is grayed out it is a hardware issue.

  • Create feature for generate new collection having separate content database by using custom coding with C#

    Hi all My self ArunDarly .Iam using share point 2010 ,I want below task solve by  using custom coding with
    C#
    I have one task that create new site collection having separate content database. and that content database site collection limit  should be only one  (it must contain one site collection and note more than one  )
    This total functionality should happen when I am saving one list item (dynamically generate new site collection ) 
    If any body know this Please give me your guidance  
    Thanking  You,
    Arun Darly

    Hey Arun,
    I have done the same job. Hope this code will help you.
    using (SPSite siteCollectionOuter = new SPSite("Any SC url in which u want to create site."))
    SPWebApplication webApp = siteCollectionOuter.WebApplication;
    SPSiteCollection siteCollection = webApp.Sites;
    SPContentDatabase contentDatabase =
    siteCollection.WebApplication.ContentDatabases.Add(ServerName, New Database Name, Admin Name,
    "Admin Password",25,50, 0);
    //Above line will create new content DB
    contentDatabase.Update();
    siteCollection.WebApplication.Update();
    SPSite newSite = contentDatabase.Sites.Add("New SC Url", "SC Title", SC Desctipyion, 1033,
    15, "STS#0", "SC Admin", "Admin", "admin password",
    "User 2", "User NAme", "Password");
    //Ablove line will create new SC in to the Content DB
    //add the upper limit for the site collection
    SPQuota quota;
    quota = new SPQuota {StorageMaximumLevel = 2510220};
    newSite.Quota = quota;
    // And update the site collection and the content database
    newSite.RootWeb.Update();
    contentDatabase.Update();

  • Facetime problem. am having issues with facetime on iphone 4. Have gone to settings and turned on facetime and it will work (have tested it and my partner can facetime me but no icon comes up on my phone and so doesnt link to any of my contacts

    Facetime problem. am having issues with facetime on iphone 4. Have gone to settings and turned on facetime and it will work (have tested it and my partner can facetime me but no icon comes up on my phone and so doesnt link to any of my contacts

        Oh boy! Acting kind of weird seems to be an understatement, aquaequus!
    What type of troubleshooting were we able to do with you? I want to make sure that we can get some sort of resolution for this problem.
    It is quite possible the battery door may get your phone in working order again. I'm not sure if the store has it in stock, but it is available in our warehouse for $14.99 which can be ordered via customer service.
    Tamara H.
    Follow us on Twitter @VZWSupport

  • I have a macbook pro 1.5 years old ver10.7.5 and now having a problem with having to manually force quit after a hour or so of use to clear up memory(unit slows down) should I up grade iso if so to what

    I have a macbook pro 1.5 years old ver10.7.5 and now having a problem with having to manually force quit after a hour or so of use to clear up memory(unit slows down) should I up grade iso if so to what and what is the correct procedure?  Rick

    To determine if it is, boot into Safe Mode and see what happens. http://support.apple.com/kb/HT1455
    In the Activity Monitor, what are the Page Outs and Page Ins?

  • Has anyone ran into the problem of having an old apple id and now can't download any past purchases

    Has anyone ran into the problem of having an old apple id and now can't download any past purchases

    Go to settings/itunes & app store and logout of your new ID and log in with the old, then try looking for past purchases again

  • Is there any problem for having Oracle and Oracle Express?

    Hi
    Thank you for reading my post
    is there any problem with having both oracle 10gR2 and oracle express installed on the same machine?
    thanks

    There is no theoretical technical problem with multiple Oracle databases on a machine, and I have indeed such an environment on several machines.
    Although people have been known to create their own technical problems by not being careful.
    You may want to review your knowledge of Oracle architecture, as you MUST have separate ORACLE_HOMEs. The ORACLE_HOME and ORACLE_SID are predefined for XE and it's important to keep things straight.

  • Org.hibernate.AnnotationException: Cannot find the expected secondary table

    Hello
    My detailed problem is on the topic:
    http://forum.java.sun.com/thread.jspa?threadID=5123752&tstart=0
    Rest of the classes are the same but I have changed my persistence.xml to:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="cname" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
         <jta-data-source>java:/OracleDS</jta-data-source>
         <properties>
                   <property name="hibernate.hbm2ddl.auto" value="update"/>
                   <property name="hibernate.ejb.autodetection" value="class"/>
                   <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
         </properties>
         </persistence-unit>
    </persistence>I am still getting the exception:
    org.hibernate.AnnotationException: Cannot find the expected secondary table: no CUSTOMER available for entities.Customer
         at org.hibernate.cfg.Ejb3Column.getJoin(Ejb3Column.java:293)
         at org.hibernate.cfg.Ejb3Column.getTable(Ejb3Column.java:272)
         at org.hibernate.cfg.annotations.SimpleValueBinder.make(SimpleValueBinder.java:222)
         at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1728)
         at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1171)
         at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:706)Can anyone please tell me why I am getting this exception?
    Thanks!

    Did you ever find a solution for this problem? I'm getting the same errors.

  • Enqueue with multiple secondary tables

    I have an enqueue object that locks one primary table and several related secondary tables.  When I call the FM using the key of the primary table I notice that I cannot open any secondary table record in change mode in an alternative transaction.  It's as if each secondary table has been entirely locked.
    I was expecting that only those records in any secondary table whose foreign key matches the key of the primary table would be locked.
    How do I lock only the set of related records based on the key of the primary table without having to loop at each related secondary table record and locking these in turn?  I mean, I know I could do this, but is that really the only way?
    How does SAP manage this problem?

    Sandra
    Ok, so I created the tables and locks from scratch.  The only thing I did differently was to run the enqueue FM's via SM37 so I don't have to create 2 new test programs.  I am still getting the same results as before.
    This is my dummy Table T1 (key = ZF1)
    ZF1    |    ZF2    |   ZF3      
    0001   |    A      |    AA    
    0002   |    B      |   BB   
    0003   |    C      |   CC   
    0004   |    D      |   DD 
    0005   |    E       |   EE
    This is my dummy Table T2 (key = ZF4 + ZF1; FK = ZF1)
    ZF4     |   ZF1      |    ZF5       
    2001    |   0001    |     AA        
    2002    |   0001    |     AB        
    2003   |    0002    |     AC        
    2004    |   0001    |     AD        
    2005    |   0003    |     AE        
    2006    |   0004    |     AF        
    2006    |   0005    |     AG        
    2007    |   0005    |     AH        
    There are also 2 enqueue FM's.  E1 locks T1 & T2; E2 locks only T2.  When I execute E1 where T1-ZF1 = 0001 I expect that the foreign key relationship in T2 would mean I also lock T2 where ZF4 = 2001, 2002 and 2004.  Yet for example, when I execute E2 with T2-ZF4 = 2007 in another session this triggers a lock conflict.
    The only way I can request a successful lock on T2 when I have already called E1 is to fully qualify all of the E2 FM parameters.  For example, if I call the E2 where T2-ZF4 = 2007 and T2-ZF1 = 0005 then the request is Ok.

  • Limiting duplicate records in secondary tables?

    I have a report in CR2010 that links multiple tables. One of the linked tables has a many-to-one relationship with the primary table. I need a way to say, in effect, "Only the record with the latest date from the secondary table", thus pruning the earlier dated records. Con someone please provide a few pointers and/or some articles I can read to assist in this? Thanks!!
    ETA: What's happening is that, because of the multiple records associated with each primary record, I'm getting multiple identical details, with only the one field from the other table different. I need to only have ONE detail line that is limited to that latest secondary table record.

    you've got a couple of choices then...
    A > Group Selection Formula
    1) you can create a Group on the date field and have the Group for Every Day.
    2) you can then create a Maximum on the date field
    3) create a Group Selection Formula where you have = Max()
    the problem with this is that you don't limit the number of records coming back to your report...you're just hiding them
    B > Experiment with a SQL Expression to Use in Your Record Selection Filter
    please note that this is not a supported functionality of SQL Expression fields and will sometimes work and sometimes not...hopefully it will. the following uses the Orders table in the sample Xtreme database for crystal.
    1) create a new SQL Expression Field called "MaxOfMyDate"  with syntax like the following...please note that i have aliased the Orders table that is used in the main report as Orders2...this is to avoid any errors by using the SQL Expression in the Record Selection Filter
    (SELECT MAX(`Orders2`.`Order Date`) FROM `Orders` `Orders2`)
    2) now go back to your Record Selection Filter and change it to something like
    {Orders.Order Date} = {%MaxOfMyDate}
    the above, if it works off of your database, will bring back only order dates that are equal to the very latest order date.
    cheers,
    jamie

  • CMP insert failure using secondary table

    I've defined a CMP with a column from a secondary table.
    The retrieval/updates work fine, but I'm getting a failure
    on insert. It's trying to insert a duplicate primary key into the secondary table. I do NOT want to insert into the secondary table when I insert into the primary table. I just want to retrieve data from that table on findByPrimaryKey from the
    primary table. Is there any way to do this??

    How can you retrieve from the secondary table w/o inserting into it? Can you send me your table definition? What error do you get?

  • Problem with text formatting within a table in Adobe Forms

    Hi all,
    I have a table on a non-interactive Adobe form (which is a copy of the standard expense form PTRV_EXPENSE_FORM.  The table in ABAP has a text field with CHAR50.  On the form, the text field has a width which allows approximately 35 characters.  Therefore the text wraps onto a second line.  My problem is that the text is not formatted and words are just split randomly.
    For example:
    The fox ran across the fields and into the woods.
    would be output as:
    The fox ran across the fields and i
    nto the woods.
    How can the text be formatted to only output complete words?
    I have tried defining the textfield as text only and rich text, but nothing changes the output.
    Interestingly, even if I change the font size from say 10 to 8, the text is output the same, even though there is enough space for at least one more word on the first line.
    Has anyone else come across this problem?
    Thanks,
    Patricia

    Hi Syed
    The table is IT_RECEIPTS_ADD_INFO, field VALUE_CHAR.  In the form it is called Receipts_addl_info.
    I have just found out that the data is being re-formatted in the interface.  That caused the problem.  Many, many thanks for your help. 
    Best regards
    Patricia

  • Problem with ORA-19025 when joining tables

    I am querying a table that stores xml datata in an xml column. I an query this column without problems. If I join the table with another table (not xml). I get the error below.
    ORA-19025: EXTRACTVALUE returns value of only one node
    19025. 00000 - "EXTRACTVALUE returns value of only one node"
    *Cause:    Given XPath points to more than one node.
    *Action:   Rewrite the query so that exactly one node is returned.
    I don't seem to have any subnodes in the fields I am querying and I dont know how joining to the second table introduces the problem.
    This produces the error I mentioned before
    SELECT a.NAME,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/title') TITLE,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/origin') ORIGIN,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/pubdate') PUBLICATION_DATE,
    GDB_ITEMTYPES.NAME
    FROM GDB_ITEMS_vw a, GDB_ITEMTYPES b
    where a.UUID = b.UUID
    This one gives no error
    SELECT a.NAME,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/title') TITLE,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/origin') ORIGIN,
    EXTRACTVALUE(xmltype(a.DOCUMENTATION), '/metadata//idinfo/citation/citeinfo/pubdate') PUBLICATION_DATE,
    FROM GDB_ITEMS_vw a
    I am using 11g 2
    Any suggestions are welcome
    Thanks
    Edited by: user3444035 on Mar 18, 2011 1:43 PM

    Hi,
    Could you give some sample data from GDB_ITEMS_vw and GDB_ITEMTYPES?

  • Problem occured when create a tree table for master-detail view objects using SQL queries?

    I am programming a tree table for master-detail view objects using SQL queries and these 2 view objects are not simple singel tables queries, and 2 complex SQL are prepared for master and view objects. see below:
    1. Master View object (key attribute is SourceBlock and some varaible bindings are used for this view object.)
    SELECT  cntr_list.SOURCE_BLOCK,                   
            sum(                   
             case when cntr_list.cntr_size_q = '20'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr20 ,                   
            sum(                   
             case when cntr_list.cntr_size_q = '40'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr40 ,                   
             sum(                   
             case when cntr_list.cntr_size_q = '45'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr45                    
    FROM (       
        SELECT yb1.BLOCK_M as SOURCE_BLOCK,       
               scn.CNTR_SIZE_Q,        
               count(scn.CNTR_SIZE_Q) AS cntr_qty        
        FROM  SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2       
        WHERE       
        scm.cmr_n = scn.cmr_n             
        AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')                 
        OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))                 
        AND scm.shift_mode_c = :ShiftModeCode                           
        AND scm.end_terminal_c = :TerminalCode      
        AND scm.start_terminal_c = yb1.terminal_c                  
        AND scm.start_block_n = yb1.block_n                  
        AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n                  
        AND scm.end_terminal_c = yb2.terminal_c                  
        AND scm.end_block_n = yb2.block_n                  
        AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n           
        AND scn.status_c not in (1, 11)             
        AND scn.shift_type_c = 'V'             
        AND scn.source_c = 'S'       
        GROUP BY yb1.BLOCK_M, scn.CNTR_SIZE_Q       
    ) cntr_list       
    GROUP BY cntr_list.SOURCE_BLOCK
    2. Detail View object (key attributes are SourceBlock and EndBlock and same varaible bindings are used for this view object.)
    SELECT  cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK,                
            sum(                     
             case when cntr_list.cntr_size_q = '20'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr20 ,                     
            sum(                     
             case when cntr_list.cntr_size_q = '40'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr40 ,                     
             sum(                     
             case when cntr_list.cntr_size_q = '45'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr45                      
    FROM (         
        SELECT yb1.BLOCK_M as SOURCE_BLOCK,     
               yb2.BLOCK_M as END_BLOCK,  
               scn.CNTR_SIZE_Q,          
               count(scn.CNTR_SIZE_Q) AS cntr_qty          
        FROM  SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2         
        WHERE         
        scm.cmr_n = scn.cmr_n               
        AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')                   
        OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))                   
        AND scm.shift_mode_c = :ShiftModeCode                             
        AND scm.end_terminal_c = :TerminalCode        
        AND scm.start_terminal_c = yb1.terminal_c                    
        AND scm.start_block_n = yb1.block_n                    
        AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n                    
        AND scm.end_terminal_c = yb2.terminal_c                    
        AND scm.end_block_n = yb2.block_n                    
        AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n             
        AND scn.status_c not in (1, 11)               
        AND scn.shift_type_c = 'V'               
        AND scn.source_c = 'S'         
        GROUP BY yb1.BLOCK_M, yb2.BLOCK_M, scn.CNTR_SIZE_Q         
    ) cntr_list         
    GROUP BY cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK
    3. I create a view link to create master-detail relationship for these 2 view objects.
    masterview.SourceBlock (1)->detailview.SourceBlock (*).
    4. I create a tree table using these 2 view objects with master-detail relationship.
    When I set default value for variable bindings of these 2 view objects and the matching records exist, tree table can work well. I can expand the master row to display detail row in UI.
    But I need to pass in dymamic parameter value for variable bindings of these 2 view objects, tree table cannnot work again. when I expand the master row and no detail row are displayed in UI.
    I am sure that I pass in correct parameter value for master/detail view objects and matching records exist.
    Managed Bean:
            DCIteratorBinding dc = (DCIteratorBinding)evaluteEL("#{bindings.MasterView1Iterator}");
            ViewObject vo = dc.getViewObject();
            System.out.println("Before MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
            System.out.println("Before MasterView1Iterator ShiftModeCode="+ vo.ensureVariableManager().getVariableValue("ShiftModeCode"));
            vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
            vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
            vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
            vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
            vo.executeQuery();
            System.out.println("MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
            DCIteratorBinding dc1 = (DCIteratorBinding)evaluteEL("#{bindings.DetailView1Iterator}");
            ViewObject vo1 = dc1.getViewObject();
            System.out.println("Before DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
            System.out.println("Before DetailView1Iterator ShiftModeCode="+ vo1.ensureVariableManager().getVariableValue("ShiftModeCode"));
            vo1.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
            vo1.ensureVariableManager().setVariableValue("DateTo", dateTo);
            vo1.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
            vo1.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
            vo1.executeQuery();
            System.out.println("after DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
    5.  What's wrong in my implementation?  I don't have no problem to implement such a tree table if using simple master-detail tables view object, but now I have to use such 2 view objects using complex SQL for my requirement and variable bindings are necessary for detail view object although I also think a bit strange by myself.

    Hi Frank,
    Thank you and it can work.
    public void setLowHighSalaryRangeForDetailEmployeesAccessorViewObject(Number lowSalary,
                                                                              Number highSalary) {
            Row r = getCurrentRow();
            if (r != null) {
                RowSet rs = (RowSet)r.getAttribute("EmpView");
                if (rs != null) {
                    ViewObject accessorVO = rs.getViewObject();
                    accessorVO.setNamedWhereClauseParam("LowSalary", lowSalary);
                    accessorVO.setNamedWhereClauseParam("HighSalary", highSalary);
                executeQuery();
    but I have a quesiton in this way. in code snippet, it is first getting current row of current master VO to determine if update variables value of detail VO. in my case, current row is possibly null after executeQuery() of master VO and  I have to change current row manually like below.
    any idea?
                DCIteratorBinding dc = (DCIteratorBinding)ADFUtil.evaluateEL("#{bindings.SSForecastSourceBlockView1Iterator}");
                ViewObject vo = dc.getViewObject();           
                vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
                vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
                vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
                vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
                vo.executeQuery();
                vo.setCurrentRowAtRangeIndex(0);
                ((SSForecastSourceBlockViewImpl)vo).synchornizeAccessorVOVariableValues();

  • Problem with Indesign CC 2014 and tables

    Problem with Indesign CC 2014 and tables. The text rearranges itself when I delete or add something in a table; the footnotes to the text associated with the overlap even getting unreadable. Just click on the chain symbol in the window and everything is fine. Why?

    try circumventing your cc app and see if that helps:
    if you follow all 7 steps you can directly download a trial here:  Adobe CC 2014 Direct Download Links: Creative Cloud 2014 Release | ProDesignTools
    if you have a problem starting the download, you didn't follow all 7 steps, or your browser does not accept cookies.
    the most common problem is caused by failing to meticulously follow steps 1,2 and/or 3 (which adds a cookie to your system enabling you to download the correct version from adobe.com).
    failure to obtain that cookie results in an error page being displayed after clicking a link on prodesigntools.com or initiates the download of an incorrect (eg, current) version.

Maybe you are looking for

  • One doubt in VL03N transaction/

    Hi All,           I have one doubt in VL03N transaction.I am an ABAPer.I don't iknow much about the SD process.My SD consultant has changed the Ship-To-Party addressin customer master but it is not reflecting in the document in VL03N.But when I see i

  • Can I import 2 sets of photos with the same file name numbers?

    I've inadvertantly not had my camera set to "continuous" for file names and now have 2 memory cards with 2 different sets of images with the same file names. Can I still import both into Lightroom 2 without problems? What are the consequences? Thanks

  • 911- textarea captured but can not displayed well on Browser with linebreak

    Please have a look at point 1 and answer point 2. Please do any suggestion 1. Here is a test.jsp code: <script language="javascript1.2"> function OK() alert(document.frm.textarea.value); return true; </script> <% if (request.getMethod().equalsIgnoreC

  • Blog question

    When I edit my text on my iweb blog (using the entries page), all the work I've done picking the right fonts and colors, is lost when I go back to the main blog page. On the main blog page I cannot edit the text, it says to do so in the entries page.

  • Error in opening Bank Site

    HI, Query 1: I allowed Finance & Investment URL category. That to also when I'm trying to open bank site, it was not open. I checked Policy trace for that URL. I found following result. <O/P Omitted> User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Win