View Link Editor Issue - empty query clause if based on association

JDeveloper 10.1.2
Setup:
- entities A and B
- a 1 to * association from entity A to entity B (A_B_association)
- a view of A based on entity A (AView)
- a view of B based on entity B (BView)
- BView has an expert mode query
Create a view link from table A to table B:
- choose the A_B_association under AView for the source attribute
- choose the A_B_association under BView for the destination attribute
- click add
- click next
issue: the query clause is empty
- click next:
info dialog pops up;
title = "Business Components"
message = "Restoring the default where clause."
Note, however, that creating a view link based on the attributes works. That is, if I choose the primary key attribute under AView for the source attribute, and the corresponding foreign key attribute under BView for the destination attribute, then the wizard generates the expected query clause.
If I create a new project and recreate the entities, the views, and the association, then I can successfully create a view link based on the association. The foreignKey value on the association end was different in the new association XML file.  I modifed the old XML file so that it used the same foreignKey element, but that did not seem to work.
I am guessing that this is some sort of user error on my part or that we have otherwise managed to squat up our XML files.
Any tips, hints, or ideas appreciated.
Thanks,
Steve

The problem is in AView.
We had modified the AView at one point, then reverted it to a default view of entity A. Here, "a default view" means that we undid our custom changes (apparently not thoroughly enough); that is, we did not delete it and create a default view from scratch using the contextual menu on the A entity.
The bottom line is that the AView attributes were not being mapped to the entity -- they were showing up as calculated attributes.
We created a "New Default View Object..." from the contextual menu of entity A, then manually corrected the AView.xml file to solve the problem.

Similar Messages

  • View links in oracle ADF/query featching from Database

    Please any one help for this query
    I have two tables Emp, Dept
    I have query like this select * from Emp e, Dept d where e.deptno=d.deptno
    Query is fetching like this
    Empno Ename job Salary Comm deptno deptno dname      Loc
    15 i1     support     50000     11     5     5     IT          sss
    15 i1     support     50000     11     3     3     Account     sss
    16 i2     support     8000     10     5     5     IT          sss
    16 i2     support     8000     10     3     3     Account     sss
    16 i2     support     8000     10     3     3     Software      sss
    16 i2     support     8000     10     4     4     Operation      sss
    Query is fetching 6 rows.
    but my requirement is what ever records fetching from database with same employee number is one record that is same employee number dept names grouped I will show it as one record how to fetch records from data base.
    Here is the example (My Requirement):
    This is first row:
    Empno Ename job Salary Comm
    15 i1     support 50000     11
    Deptno dname      Loc
    5     IT          sss
    3     Account     sss
    This is second row:
    Empno ename job Salary Comm
    16 i2     support     8000     10
    Deptno dname      Loc
    5     IT     sss
    3     Account     sss
    2     Software sss
    4     Operation sss
    i am useing oracle ADF if any possibility in view links either i get from the query as i mentioned.
    plz any one can help
    thanks

    Please any one help for this query
    I have two tables Emp, Dept
    I have query like this select * from Emp e, Dept d where e.deptno=d.deptno
    Query is fetching like this
    Empno Ename job Salary Comm deptno deptno dname      Loc
    15 i1     support     50000     11     5     5     IT          sss
    15 i1     support     50000     11     3     3     Account     sss
    16 i2     support     8000     10     5     5     IT          sss
    16 i2     support     8000     10     3     3     Account     sss
    16 i2     support     8000     10     3     3     Software      sss
    16 i2     support     8000     10     4     4     Operation      sss
    Query is fetching 6 rows.
    but my requirement is what ever records fetching from database with same employee number is one record that is same employee number dept names grouped I will show it as one record how to fetch records from data base.
    Here is the example (My Requirement):
    This is first row:
    Empno Ename job Salary Comm
    15 i1     support 50000     11
    Deptno dname      Loc
    5     IT          sss
    3     Account     sss
    This is second row:
    Empno ename job Salary Comm
    16 i2     support     8000     10
    Deptno dname      Loc
    5     IT     sss
    3     Account     sss
    2     Software sss
    4     Operation sss
    i am useing oracle ADF if any possibility in view links either i get from the query as i mentioned.
    plz any one can help
    thanks

  • Bug in View Link editor

    When creating a many-to-many view link based on a many-to-many association, the view object on the left must be based on the entity that was on the left when creating the association. Why is this? Surely it shouldn't matter.

    Just to add to this:
    If the view object on the left of the link is not based on the entity that was on the left when creating the underlying association then the accessors for the association will not be visible under the view in the link editor.

  • View link refresh issue in a ADF Faces application

    ADF BC, ADF Faces, JDeveloper 10.1.3.3
    There is an example.
    I have an Entity SaleEntity and two view objects: SalesView (based on the SaleEntity) and ProductsView (read only). SaleEntity has an attribute productId to reference a product sold. SalesView and ProductsView are related by a view link. The link works fine in a Business Component Browser.
    Then I created a ADF Faces form to edit a sale. I used an af:selectInputText component for a productId:
    <af:selectInputText
        value="#{bindings.ProductId.inputValue}"
        label="#{bindings.ProductId.label}" 
        required="true"
        columns="6"
        action="dialog:ProductSearch"
        autoSubmit="true"
        valueChangeListener="#{CreateSaleBean.productId_valueChanged}" 
        tip="#{bindings.ProductsViewName.inputValue}">
      <af:validator binding="#{bindings.ProductId.validator}"/>
    </af:selectInputText>
    {code}
    User can enter productId directly or select a product from a LOV. I set a tip attribute of af:selectInputText to display a name of the current product. The tip uses ProductsView through the view link between SalesView and ProductsView. valueChangeListener is used here to make tip update right after partial form submit:
    {code:java}
      public void productId_valueChanged(ValueChangeEvent valueChangeEvent) {
        String prodId = (String) valueChangeEvent.getNewValue();  
        JSFUtils.setExpressionValue("#{bindings.ProductId.inputValue}", prodId);
        getIteratorBinding("SalesViewIterator").refresh(DCExecutableBindingDef.RC_REFRESH);
        getIteratorBinding("ProductsView").refresh(DCExecutableBindingDef.RC_REFRESH);
    {code}
    SaleEntity has a productId attribute validator to ensure that id of existing product was specified. The validator is implemented in the same way as ADF Developer Guide chapter "9.6.2 Implementing an Efficient Existence Check" describes.
    All this works fine when user enters correct productId - the new value is submitted and the tip is updated. But if user enters non existing productId - the tip doesn't change. It seems that detail view row currency doesn't change in that case. I want to make the tip empty when the provided productId is incorrect. Any ideas how to achieve this?
    Thanks,
    Marius                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Blaise,
    no I don't want to insert new product. I want make products view object have no current row.
    In addition product existence check code is in a sale entity. I don't think it is a good idea to have an entity object depending to some specific view object. Maybe I'm in the wrong.
    Marius

  • Not viewing links/coding issue

    I used iweb08 to design a website. It always displayed fine in any web browser (ie safari or explorer etc) and a Mac or a PC could view it. When I upgraded to iweb09 only PCs seem to be able to view the links on top of the home page and Macs cannot view the links on the homepage and therefore can't move around the site.
    I contacted the domain company (Hostess) and they gave me the following advice:
    "The problem you are having is a coding issue. You'll have to either consult the makers of the program (Apple iLife'09) or a web developer to find the best way to resolve this issue. Different browsers (Internet Explorer, Firefox, Safari) use different methods of displaying content and depending how the content is coded, you can run into problems like this where it shows up in one browser but not another."
    This would make sense to me if the PC couldn't see the links, but I don't understand why a Mac cannot view a page made on iweb and browsing in safari!
    If anyone has any advice I would be more than grateful.

    After talking to www.hostess.com.au again the problem was suddenly fixed, although they still claimed it was a "coding issue".

  • View Link w/ Transient View Objects

    I'm trying to create 2 view objects that contain only transient attributes and create a view link between them. I have a key defined in the parent and 2 keys in the child. When I create the view link I'm unable to generate the accessor in the source because the boxes are all grey'd out. The destination side works correctly.
    Is there any reason this shouldn't be possibly in BC4J? I've been scouring the documentation and so far I haven't found any mention that a view link will not work in this situation.
    This is in JDev. 9.0.4.
    Thank you

    A view link builds its corresponding where clause based on the selected attributes. On the source side, the attributes are used as parameters to the query, so transient attributes are fine. Attributes on the dest side get built into a where clause which would not work with transient attributes, so they are disabled.
    for example:
    select * from blah where (%1 == destVo.attr1) would not work if destVo.attr1 is transient.

  • ADF BC: both ID and view link object as getter/setter in row impl

    I notice something when generating the row implementation of VO that have links to other VO. I can't seem to find the logic behind it...
    Following model:
    users( id, address_id,name,firstname,...)
    address(id, street,number,...)
    their is an assosiation between the UsersEO and the addressEO. Their is also a view link between the UsersVO and the AddressVO based upon the assosiation of the EO's.
    When we create the row implementation of the UsersVO we find a getter and setter for both the address_id as well as the address row object.
    Why is this?
    We have this issue because i added the UsersVO and the addressVO to the app module but i haven't added the link to the appModule but when i create the SDO from the appModule, the Users has both the address_id as the address row object.
    THis does not seem to make sense. How do you use it correctly? Do you just need to set the address_id and can leave the row object null or do they both need to have the same? What if you set the address_id to 1 but the id in the address row object is set to 5...
    How do the databindings handle these things?
    To me it seems more logical that the VO only has a getter and setter for the address object and handles the address_id in the background according to the values in the address object.
    Can someone explain me why this is implemented this way and how to handle it correctly?
    Edited by: Yannick Ongena on Sep 27, 2010 5:29 PM

    Yannick Ongena wrote:
    When we create the row implementation of the UsersVO we find a getter and setter for both the address_id as well as the address row object.
    Why is this? The definition of the VL allows you to optionally generate accessors for the underliying VOs, i.e. getAddressVO() in the UsersVO and getUsersVO() in the addressVO.
    We have this issue because i added the UsersVO and the addressVO to the app module but i haven't added the link to the appModule but when i create the SDO from the appModule, the Users has both the address_id as the address row object. You should add the addressVO to the AM using the VL instead and not by itself.
    THis does not seem to make sense. How do you use it correctly? Do you just need to set the address_id and can leave the row object null or do they both need to have the same? What if you set the address_id to 1 but the id in the address row object is set to 5...
    As mentioned above, once you add the addressVO to AM using the VL, the framework will take care setting the value of the row objects accordingly.

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

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

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

  • Many to Many View Link

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

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

  • Cannot set user query to view "{0}" because it is a destination in a view link

    Hi
    11.1.1.7 - I have 2 programatically view objects. I have created a viewLink between them and I am getting the error:
    Cannot set user query to view "MyView2" because it is a destination in a view link.
    Does anyone know what are the methods I need to implement? I have follow the Frank Nimphius Post: Oracle ADF: Service, Please! and it is working fine. However, after seeing this example: Decompiling ADF Binaries: Building programmatically managed business components - Part 2 - I realised that I am missing some other stuff to make the view link work. There are too many methods and its quite difficult to understand and digest all classes and methods etc.
    Anyone can please point me in the right direction?
    Regards

    Which version are you using? Could you maybe turn on logging (http://blog.goverco.com/p/psmalogging.html) and post content of log file if you still have the issue...
    Also, remember that even though you set credentials in the PARAM section, these values are overwritten by the ones specified on the properties of the MA - so make sure that you specify correct creds on the MA. Specifying creds directly in the script makes
    for an easy way of testing from the PowerShell prompt, but not for running the script from the MA / Run Profiles
    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

  • View Link between two query views

    Hi is it possible to create a view link between two views having the where clause bind variables.
    How you set the bind variables at the run time for the View objects. It is giving hard time for me to use the Master view in the XmlData bean to generate the Xml document.
    I am able to set the Master views bind variables, but for view link destination view
    where clause bind variables are not able to set ( link object link condition bind variables are binded run time but the views where chause bind variables of destination view are unable to setand bind)
    Thanks
    null

    Easiest way to do this is to add additional transient attributes to your master view object, and then include those additional transient attributes in the list of source attributes for your view link. This way, you can get BC4J to automatically refer to their values with no additional code on your part.

  • Tag Query error when assigning mode in Link Editor

    Hi,
    I am receiving the following error when I run a transaction that contains a Tag query.  In my transaction I have set the tag query mode to be defined by a local property via the link editor.  Then when I execute the transaction I get the following error:
    "[ERROR] [TAG_QUERY_WRITE_TAG]com.sap.xmii.Illuminator.logging.LHException: Mode parameter was not found or is malformed"
    I am on version 12.1.8 Build(43).
    I import the project into MII 12.1.4 Build(53) and the transaction works as expected.
    In the new verson of MII is there a bug utilizing the link editor to set mode?  Or is there a specific way it wants the mode linked. (e.g. specific case)
    Additional details:
    I am trying to use the CurrentWrite mode.  I have tried setting Current mode via the link editor and that isn't working either. 
    Any suggestions?
    Thanks,
    Justin

    Hi Mike,
    Please correct me if I understand the logic incorrectly.  But here is what I am thinking....
    I have configured my transaction to have this flow:
    String_List_To_XML_Sequence --> Repeater_TagValues  -->  TAG_QUERY_WRITE_TAG
    The String_List_To_XML_Sequence would contain String_List_To_XML_Parser_TagValues & String_List_To_XML_Parser_TagNames.
    With this flow the logic would say that I will be running a seperate tag query for each tag value.  So if I have 100 tag values that I want to send, I will run 100 tag queries.  This doesn't seem the most efficient.  Also if this is how you were thinking I would configure the transaction then I could use the following links:
    Target Xpath: TAG_QUERY_WRITE_TAG.TagValue.1
    Expression: String_List_To_XML_Parser_TagValues.Output{/Rowsets/Rowset/Row[#Repeater_TagInput.CurrentItem#]/Item}
    Target Xpath: TAG_QUERY_WRITE_TAG.TagName.1
    Expression: String_List_To_XML_Parser_TagNames.Output{/Rowsets/Rowset/Row[#Repeater_TagInput.CurrentItem#]/Item}
    With this configuration updating 10 tags takes 2 seconds:
    [INFO] Statistics [Load = 35 ms msec, Parse = 35 ms, Execution = 2015 ms, Total = 2067 ms]
    With my old configuration updating 10 tags took 700 ms. (original transaction on 12.1.4 Build (53)
    [INFO] Statistics [Load = 11.137 msec, Parse = 224.113 msec, Execution = 451.78 msec, Total = 736.62 msec]
    Please let me know if I interpreted your thoughts incorrectly.
    If there is a way to utilize only 1 Tag Query, then I am not sure how the transaction flow should be configured.
    Thanks for your time,
    Justin
    Edited by: Justin M Brown on Jul 14, 2011 7:29 PM
    Edited by: Justin M Brown on Jul 14, 2011 7:33 PM

  • Passing query template name to BLS SQL action in the link editor

    I want to have one transaction that uses the SQL query action, but which query template it uses will be dependent on some user input. I am having trouble passing the query name. I'm using the full file path in xml format (i.e. "c://<folder1>//<folder2>//<folderN>//"&PassedFileName&".xml", but with backslashes instead of forward slashes). I got an error around the connector, so I set that too. Then I got an error around mode, so I set it to "FixedQuery". Now I'm getting, "The Query expression was not set with the Query parameter".
    There are only 3-5 possible queries that will be used, so I'd rather build SQL queries and just pass the transaction the name of the query, as opposed to passing the full text of the query each time.
    Thanks,
    Carrie
    Edited by: Carrie Schimizzi on May 9, 2008 6:38 PM
    Edited by: Carrie Schimizzi on May 9, 2008 6:39 PM
    Edited by: Carrie Schimizzi on May 9, 2008 6:40 PM

    Carrie,
    If you haven't already done so, configure your master BLS transaction with a proper representative runtime variation, which will make the whole process simpler to create and troubleshoot.  Quite often when people try to use the dynamic capabilities of MII, they end up getting confused because of user over-complication.  In your SQLQuery action block make sure you configure it to a valid template that would be one that the user would provide as an input (don't forget to allow the generation of sample results for making any subsequent trx efforts easier).  Then look in the link editor and you should see this string value for the query template link if you hover over the corresponding blue T icon.  This will show you the format you need to provide from your Transaction input property (which should also have a valid default value assigned so you can test the transaction by itself, without needing to initially rely on the Xacute Query template layer.
    Regards,
    Jeremy

  • View Link Issue

    Hi Guys,
    I have 2 (SQL Query's) VO's with primary key -foriegn key relation for the underlying tables
    but when i create a VL the view link query dosent showup correctly ... is it necessary to have
    VO's based on Eo's for view links to work properly ?
    Thanks
    Tom...

    Tom,
    In case of VO based on plain sql queries u won't get <SourceVO>.sourceattr u will simple get sourceattr
    It seems something is wrong on some other side, by the way whats the difference ur getting in result of vl created on VO based on EO and not based on EO?
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Order By clause - View link consistency

    Hi,
    I have created an EO ( EmpEO ) on EMP table. Created two VOs ( EmpVO and MaxEmpIdVO ) based on EmpEO.
    For MaxEmpIdVO,
    1. Set the Updatable for EmpEO to false
    2. Tuned it to return At Most One Row
    3. Set the Order By to "EMPNO Desc"
    I want to use this VO to get maximum of EmpNo.
    Added these two VOs to AM.
    After creating a new EmpVO row, the row gets added to rowset of MaxEmpIdVO also because of view link consistency.
    But, when I re-executed the query for MaxEmpIdVO, it resulted in two rows ( the newly added row and the row with maximim empid in DB ). MaxEmpIdVO.first() returns the newly added row though it's not the row with maximum EmpId.
    Is it the expected behaviour ?
    I was expecting it to return the row with maximum EmpId among the rows in DB and newly added rows through EmpVO as well.
    Can anyone please help ?

    Look like you are using expert mode VO, in that case this is expected behavior. You can turn OFF the View link consistency for this specific VO by calling setAssociationConsistent(false); in the ViewObjectImpl::create();
    Another possibility is to add th custom filtering in the overridden ViewObjectImpl::rowQualifies(ViewRowImpl vr) - http://jobinesh.blogspot.com/2011/03/overriding-rowqualifies-for-in-memory.html

Maybe you are looking for