Creating Views on multiple entity-objects

Dear Forum,
Is it possible to make associations and lookups based on multiple entity-objects.
I made a custom view, say view1 based on two entity-objects, say entity1 and entity2.
I used some fields from entity1 and some from entity2. There's a 1 to 1 association between the index of entity1 and entity2.
Now I want to make a master-detail between entity1 and view1. I tried to make links and associations, but that didn't work.
Any ideas?
Kind regards,
Arjen

Arjen,
I am a bit confused by what it is you need. It appears you may have Entity Object and View Objects mixed up. Entity Objects are one-to-one with database tables. So, for every table one Entity Object, and the other way around. Associations are, pretty much, one-to-one with foreign keys on the database. So, if two tables have a foreign key between them, the two Entity Objects will have an Association between them. In that respect, Entity Objects and Associations are usually 'strictly defined' by the database model.
The layer of View Objects and View Links is where you 'get design control' in the Business Components arena. A View Object can be based on zero, one or more Entity Objects. Viewlink, defining 'Master-Detail' relationships between View Objects (and NOT Entity Objects!!) can but don't have to be based on Entity Associations (i.e. foreign keys), but can be based on any attribute in the 'Master' view to any attribute in the 'Detail' view.
In this respect, your statement that you want to "make a master-detail between entity1 and view1" makes no sense. It sounds like you need to create a View2, and then make a View Link between View1 and View2.
Kind regards,
Peter Ebell
JHeadstart Team

Similar Messages

  • Best practice for linking fields from multiple entity objects

    I am currently transitioning from PHP to ADF. I'm looking for the best practice for linking data from multiple entity objects.
    Example:
    EO 'REQUESTS' has fields: req_id, name, dt, his_stat_id, her_stat_id
    EO 'STATUSES' has fields: stat_id, short_txt_descr
    'REQUESTS' is linked to EO 'STATUSES' on: STATUSES.stat_id = REQUESTS.his_status_id
    'REQUESTS' is also linked to EO 'STATUSES' on: STATUSES.stat_id = REQUESTS.her_status_id
    REQUESTS.his_status_id is independent of REQUESTS.her_status_id
    When I create a VO for REQUESTS, I want to display: REQUESTS.name, REQUESTS.dt, STATUSES.short_txt_descr (for his_stat_id), STATUS.short_txt_descr (for her_stat_id)
    What is the best practice for accomplishing this? It appears I could do it a few different ways:
    1. Create the REQUESTS VO with a LOV for his_stat_id and her_stat_id
    2. Create the REQUESTS VO with the join to STATUSES performed within the query for the VO. This would require joining on the STATUSES EO twice (his_stat_id, her_stat_id)
    3. I just started reading about View Links - would that somehow do what I'm looking for?
    I also need to be able to update his_status_id and her_status_id through the by selecting a STATUSES.short_txt_descr from a dropdown.
    Any suggestions on how to approach such a stupidly simple task?
    Using jDeveloper 11.1.2.2.0 if that makes a difference in the solution.
    Thanks ahead of time,
    CJ

    CJ,
    I vote for solution 1 as it's just your use case. As you said you what to update the his_status_id and her_status_id through the by selecting a STATUSES.short_txt_descr by a drop down. This is exactly the LOV solution.
    ViewLinks are used fro master detail navigation (which you don't do here) and Joining the data make it difficult to update (and you still need a LOV for the drop down box.
    Timo

  • Create view from multiple days tables

    Hi,
    I'm having existing oracle db with daily stat data, tables strangely named data_mon, data_tue, data_wed.. For my batch processing I plan to use view with multiple day data, let say for last 5 days.
    Not sure how better implement my sql statement, with those _mon suffixes to make it more or less dynamic.
    I also never create View from multiple tables, so probably I can do something that will add fresh daily data and delete 5 days old data?
    Will appreciate you comments on details and whole concept. I have prev sql server experience.
    Thanks
    T

    user12943718 wrote:
    Hi,
    I'm having existing oracle db with daily stat data, tables strangely named data_mon, data_tue, data_wed.. For my batch processing I plan to use view with multiple day data, let say for last 5 days.
    Not sure how better implement my sql statement, with those _mon suffixes to make it more or less dynamic.
    I also never create View from multiple tables, so probably I can do something that will add fresh daily data and delete 5 days old data?
    Will appreciate you comments on details and whole concept. I have prev sql server experience.
    Thanks
    TChange the data model so you don't have 1 table for a day.
    You just have a DATA table, and a column to denote the day of applicability.
    Then you don't need a view, don't need anything dynamic, don't need to smash your head against a wall for a simple query ... etc.

  • Create confirmation for multiple cost objects PO in SUS

    Hi,
    Is it possible to create confirmation for multiple cost objects PO ( order type 'MA') in SUS ?
    We are going to implement SRM 7.
    Thanks & regards,
    Afandi-

    Hi All,
    First of all, thanks for your responses..
    Right, about the issue, what I explained here was that I am indeed assigning only one cost object: the WBS element. The issue was that even though I am assigning only the WBS element, it was also assigning the cost to the cost center by default. I did some R&D and found the solution to the issue (I was also asked to look for OSS notes but was not satisfied that this issue needs an OSS note to be applied so tried my solution). The issue was in table: T788M (allocate costs to variable account assignment). Here, I created an entry and called it USERGROUP_2 (just a random name) and assigned the variable cost objects (only the WBS and the Cost center) to be displayed. In the next step, I assigned this usergroup to the country in quesion feature (TRVCO). By doing this, I tell the system that only these cost objects are to be considered when an employee wants to assign the cost object. If the system sees that there is no value from the drop down to choose from, it picks up the default cost object (cost center). This was a simple issue that I had to rattle my brains on... but the solution I mention above worked like a hot knife going through butter...
    If you guys face this issue, please try this else feel free to get in touch with me on my number below.
    Once again, thanks for your responses.
    Best regards,
    Tanmay Dhingra
    +91 880 6666 606

  • BC4J: problems creating view object with multiple entity objects

    Hi,
    I working with a view object which contains two entity objects with parent-child relationship like this:
    ViewObject - ParentEntityObject - PId
    PAttribute
    CId (FK)
    (- ParentChildAssociation)
    - ChildEntityObject - CId
    - CAttribute
    The 'Read Only' and 'References' options are checked for the association in the view object.
    I'm creating a new row using this view object. The parent object should be created new and the child object already exists in the database, so I'm setting only the attributes of the parent object (including foreign key).
    After creating the row I display it in a jbo:DataTable and only those attributes coming from the parent object are displayed. The attributes of the child object are not set. After a commit all attributes appear.
    The problem is, that I want to display the new row with all attributes to the users BEFORE they commit.
    I tried to set the child attributes, but they are read only by definition and even when I unchecked the 'Read Only' option and set the attributes to 'Always Updateable' in the view object it is giving me
    JBO-27008: Attribute set for CAttribute in view object ViewObject failed.
    Is there a way to make all attributes of the child object visible in the view object without committing changes?
    (JDev 9.0.2.822)
    Any help would be appreciated.
    Regards,
    Christian

    Once again the structure, sorry.
    ViewObject
    |-ParentEntityObject
    ..|-PId
    ..|-PAttribute
    ..|-CId (FK)
    |-ParentChildAssociation
    |-ChildEntityObject
    ..|-CId
    ..|-CAttribute
    Christian

  • Problem with using multiple Entity Objects in a view Object.

    Hi
    Thank you for reading my post
    I have create 3 Business components for 3 of my database tables and now
    I must add 3 tables in a View object so i used Jdeveloper Wizard to create the View Object.
    -I Add Entity Objects which are business components to this view (In Step 2 of the Create Vview Object wizard).
    -In step 3 that I add Attributes all my attributes are marked as Transient
    Can some one explain why it happens?
    I need one of those tables to be updateable and two other tables are not updateable.
    What should should i do to achieve this?
    I should say that tables does not have any database relation (Foreign Key I Mean).
    Thanks.

    Hi user505214
    When you created your VO, on selecting the second EO, you'll note at the bottom of the same page on the wizard/editor, checkboxes for updatable or by reference. By default reference is checked and this will make your second EO's attributes transient.
    In the JDeveloper Developer's Guide for 4GL/Forms programmers, the following sections outline the difference between updatable or by reference:
    7.5 Including Reference Entities in Join View Objects
    27.9 Creating a View Object with Multiple Updatable Entities
    Make sure to read 27.9 if updatable is what you want as it indicates you may need to add some additional code.
    Hope this helps.
    CM.

  • Implement a View Object with multiple entity objects

    Hi
    In 'How to' section on the 'otn.oracle.com' (Jdeveloper) web site is tutorial how to implement a View Object with multiple updateable dependent entity objects.
    It allows user to insert an employee and a department at the same time.
    But I would like to change this example to insert a new department only if it does not already exist. How to change this sample?
    Is there any other way to this?
    Thanks
    Regards
    Gorazd

    Once again the structure, sorry.
    ViewObject
    |-ParentEntityObject
    ..|-PId
    ..|-PAttribute
    ..|-CId (FK)
    |-ParentChildAssociation
    |-ChildEntityObject
    ..|-CId
    ..|-CAttribute
    Christian

  • Creating Views on multiple databases

    In our database environment we have three databases Prod, Test, and Dev. Can anyone tell me if there is any value to ensuring that all three databases have exactly the same views on each of them all the time.(most views are fairly simplistic). Also is there an easy way to copy the views or tables from one database to the others quickly without rerunning the scripts on each database. Thanks.

    Arjen,
    I am a bit confused by what it is you need. It appears you may have Entity Object and View Objects mixed up. Entity Objects are one-to-one with database tables. So, for every table one Entity Object, and the other way around. Associations are, pretty much, one-to-one with foreign keys on the database. So, if two tables have a foreign key between them, the two Entity Objects will have an Association between them. In that respect, Entity Objects and Associations are usually 'strictly defined' by the database model.
    The layer of View Objects and View Links is where you 'get design control' in the Business Components arena. A View Object can be based on zero, one or more Entity Objects. Viewlink, defining 'Master-Detail' relationships between View Objects (and NOT Entity Objects!!) can but don't have to be based on Entity Associations (i.e. foreign keys), but can be based on any attribute in the 'Master' view to any attribute in the 'Detail' view.
    In this respect, your statement that you want to "make a master-detail between entity1 and view1" makes no sense. It sounds like you need to create a View2, and then make a View Link between View1 and View2.
    Kind regards,
    Peter Ebell
    JHeadstart Team

  • Best way to validate multiple entity objects with each other

    I have the following scenario.
    There is one entity object with the following fields.
    Name
    Start Date
    End Date
    My requirement is to validate the dates in the entity do not overlap.
    What is the best way to achieve the same.
    This validation should be fired when we commit, since the user should be allowed to change the dates freely between entities.(Validation should not kick off when the current row changes)
    Thanks

    For this to achieve there is a concept called Effective Dated Entity Objects in Oracle ADF.
    Official ADF Documentation: http://docs.oracle.com/cd/E37975_01/web.111240/e16182/bcentities.htm#ADFFD20110
    Some blogs to help you
    http://one-size-doesnt-fit-all.blogspot.co.uk/2008/11/jdev11g-new-feature-effective-dated.html
    http://adfblogs.blogspot.co.uk/2011/09/understanding-effective-dated-entities.html
    Regards,
    Peddi.

  • Creat View from Multiple tables , Multiple Select

    Hello  Everyone ,
    I have a question and am not sure if this the correct forum to post it .
    I have two table studentTable and CourseTable which is each student  take more than one course . 1:M
    for example Student1 take 2 courses (C1 ,  C2).
    Student2 take 3 courses (C1,C2, C3).
    I need to create a table/View that contain student information plus all the courses and the score for each  course in one row.
    for example
    Row1= Student1_Id ,C1_code ,C1_name  ,C1_Score ,C2_code,C2_name ,C2_Score
    Row2=
    Student2_Id,C1_code,  C1_name,C1_Score,C2_code ,C2_name ,C2_Score ,  C3_code,C3_name,C3_Score
    and since Student 1 just took two courses  , I  should enter NULL in 'Course 3 fields'
    My Struggle is in the insert  statement
    I tried the following but it show an error
    Insert Into  Newtable
    ( St_ID, C1_code,c1_name, C1_Score ,C2_code  ,C2_name,C2_score,C3_code ,C3_name,C3_score)
    Select
    (Select St_ID from  StudentTable)
    (Select C_code,c_name,c_Score
    from  Coursetable,SudentTable
    where course.Stid =Studet.stid)
    (Select  C_code,c_name,c_Score
    from course ,student
    where course.Stid =Studet.stid  ),
    (Select C_code,c_name,c_Score
    from course ,student
    where  course.Stid =Studet.stid );
    I'm fully aware that the New table will break  the rules of normalization ,but I need it in this way for specifc purpose.
    I tried  also the PIVOT BY functionality but no luck with it .
    FYI , I'm not  expert in using SQL Syntax , I just know the basic.
    I will be great full for  any helpfull suggestions to try ,
    thank you very  much.

    First Table is Member table which Represent
    Students Information
    .The fields in this table are
    member_sk (PrimaryKey), full_or_part_time, gender, age_at_entry, age_band_at_entry, disability, ethnicity,
    widening_participation_level, nationality
    Second Table is Modules table which include
    the Courses' scores that Student took .
    The fields in this table are
    Module_result_k(Primary Key), member_sk(Foreign key to connect to Member table), member_stage_sk
    ,module_k(Foreign key to connect to Module table), module_confirmed_grade_src, credit_or_result
    Third Table is
    AllModuleInfo which is include
    general information for each course .The fields in this table are
    Module_k (Primary key), module_name ,module_code, Module_credit, Module stage.
    The New table
    that I will create has the following fields
    member_sk (PrimaryKey), full_or_part_time, gender, age_at_entry, age_band_at_entry, disability, ethnicity,
    widening_participation_level, nationality 
    " This will be retrieved from Member table"
    Also will include
    Module 1_name ,module1_code, Module1_credit, Module1_ stage, member1_stage_sk
    , module1_confirmed_grade_src, credit1_or_result
    Module 2_name ,module2_code, Module2_credit, Module2_ stage, member2_stage_sk
    , module2_confirmed_grade_src, credit2_or_result
    I will repeat this fields 14 times which is equal to Maximum courses number 
    that any of the students took.
    //// I hope now my questions become more clear

  • Edit entity object and use the Create() method for generating ID's

    Hello,
    I have and InserPage.jsp and defined the datasoucre correctly.
    <jbo:InputText datasource="ds" dataitem="Clientid" /> gives me
    the unique ClientID from the FIRST client-record in my table ,
    although this page is for inserting a NEW Client, with a new
    ClientID.
    So, on the Clients Entity i made a create() method and put the
    following code in it:
    public Number getClientid() {
    return (Number)getAttributeInternal(CLIENTID);
    public void create(AttributeList attributeList) {
    SequenceImpl seq = new SequenceImpl
    ("Clientid",getDBTransaction());
    Integer i=(Integer)seq.getData();
    setClientid(new Number(i.intValue()));
    super.create(attributeList);
    the getData() Returns a sequence value, but what sequence value?
    Do i have to create a sequence on the ClientID column in my
    Oracle Table in the DB too?
    The problem is, the first ClientID # is 819 and the current last
    one seems to be 2899, so how do i achieve that when opening the
    insert.jsp the new ClientID shows up (ie. 2900)?
    How can i achieve this?
    thx

    OK, managed to track down the HowTo on triggers? I created the
    trigger.
    create sequence client_seq
    start with 8900
    increment by 1
    nomaxvalue
    nocycle;
    I changed the create() method for the entity object to:
    public void create(AttributeList attributeList) {
    SequenceImpl seq = new SequenceImpl
    ("Clientid",getDBTransaction());
    SequenceImpl s = new SequenceImpl("client_seq",
    getDBTransaction());
    Integer next = (Integer)s.getData();
    setClientid(new Number(next.intValue()));
    and running the tester for the module works fine. ;-)
    But...
    The Insert.jsp page has to insert/show this sequenced value!
    After i defined the datasource and let us say:
    <jbo:InputText datasource="ds" dataitem="Clientid" />
    ...the number 819 shows up, which is the FIRST record, so i do
    not get the new ClientID with the correct number.
    Any help is always nice. ;-)

  • Error while deleting a row from the Entity Object

    Hi OAF Guys,
    i am unable to delete the newly created row from the entity object.
    let me explain my scenario.
    1. i have a table of which some of the columns are mandatory.
    2. I am writing the code in the validateEntity to check wether the user really enter anything into the fields.
    3. My problem is, when the user creates row and wanted to delete the row without entering any details, the validate entity of the EO gets fired which will not allows to delete the row.
    Is there any workaround for this problem.
    Regards,
    Nagesh Manda.

    Hi Tapash,
    I am very sorry for not providing you the complete details of my scenario. Here i am explaining
    1. what code you have placed while creating the row and in validation method on EOImpl.
    while creating a new row i am initializing the primary key of the EO with the sequence value.
    2.When you say, you are unable to delete the row, are you getting a error message ? if yes, custom message or fwk error ?
    its not the fwk error, its the custom message which wrote in my validateEntity method of EO to check whether the user had entered all the necesary columns or not.
    3.How are you trying to delete the row ?
    while the user clicks on the delete switcher i am getting the primary key of the row and searching for the row in the vo and finally deleting it.
    The problem arises when the user creates a row, and later doesnt want to enter the details and delete it. Here while deleting the row the validateEntity method of the EO gets fired and doesnt allow me to do so :(.
    Any way appreciate your help tapash.
    Regards,
    Nagesh Manda.

  • Multiple resource objects provision issue in OIM10g

    Hi Team,
    We're facing an issue regarding multiple access policy trigger for a specific resource object in OIM.
    The scenario is whenever we try to process the enablement or creation of users through flat file recon, users are created / enabled with multiple resource objects in their resource profiles.
    When we checked in User Resource Access History report, we observe that the access policy has been triggering multiple times for these users resulting in users with multiple resource objects. Amongst these one shows provisioned/Enabled and the other shows provisioning/in some cases Provisioned/Enabled.
    Please advise as this has become an ongoing issue and also has led into data mess-up.
    Appreciate your help on this one..
    Regards,
    Sagar

    The terminology sounds a little confusing to me:
    If you mean you wanna create multiple IT Resources for a single IT Resource Instance so that the user can select the appropriate IT Resource during request creation -> All good upto here. But then since the Object/Request Form attached to a resource would be the same, so any user would always see the same form fields for creationg request.
    Example: Users creating request for Oracle Database Accounts but different server locations
    If it means you just need to create multiple Resource Objects then its a straighaway standard requirement and could be handled with normal Connector Development methodology.
    Example: Users creating requests for different resources like Oracle Database Accounts & Active Directory Accounts

  • How I configure a default value in an entity object?

    Hi,
    1:how I configure a default value in an entity object?
    attribute type: DATE
    I want to set the current date
    ...thanks

    Override the create() action in your entity object implementation:
    protected void create(AttributeList attributeList)
    * This method should be subclassed to supply programmatic default values to
    * various attributes of a new Entity Object. For example, to create a sequence.
    * Instances of subclasses should call super.create() before performing any operations.
    System.out.println("create(AttributeList attributeList) - start");
    Date datSysdate = ( oracle.jbo.domain.Date) Date.getCurrentDate();
    super.create(attributeList);
    // set the default to today...
    setHiredate( datSysdate );
    System.out.println("create(AttributeList attributeList) - end");
    }

  • Error when running the entity object

    Hi Experts,
    I am learning OAF. I created Application Module, and entity object for table emp and shcema apps.
    While running entity object, it's throwing the following error.
    Error(17,14): class practice_test_prc1.oracle.apps.mfg.simplepg.schema.server.EmpImpl should be declared abstract; it does not define method setLastUpdateLogin(oracle.jbo.domain.Number) of class oracle.apps.fnd.framework.server.OAEntityImpl
    I changed the EmpImpl class as abstract;error was rectified.
    I wanted to know why it's is giving that error, Did i make any mistake while creating the entity object?
    Awaiting your response.
    Thanks in advance.

    Hi,
    ---The custom table should contain who columns in table structure.
    CREATED_BY Number,
    CREATION_DATE Date,
    LAST_UPDATE_DATE Date,
    LAST_UPDATED_BY Number,
    LAST_UPDATE_LOGIN Number
    Refer:
    How to create a new EO in OAF?
    Regards
    Meher Irk

Maybe you are looking for