Aggregate descriptors and query keys

We are in the process of migrating from TopLink to EclipseLink.
I have a class Audit that contains the auditing columns that are common to other classes
I have another class Customer that extends the Audit.
Audit is an aggregate descriptor mapped in Customer.
There is an UpdateAllQuery to update a single customer row in the customer.
To update the audit column an addUpdate is added on the field.
query.addUpdate(builder.getField("LAST_UPDT_USER_C"), "Test");
When this query is executed I get an error saying the field is not mapped. But this field is mapped in the aggregate.
This used to work in TopLink.
Any idea why it errors out and how to solve it?
Thanks for the help.
The JavaDoc says that getField work on non mapped field -
Expression org.eclipse.persistence.internal.expressions.DataExpression.getField(String fieldName)
ADVANCED: Return an expression representing a field in a data-level query. This is used internally in EclipseLink, or to construct queries involving fields and/or tables that are not mapped.
ERROR -
Exception Description: Attribute name or expression passed as a first parameter to addUpdate method defines a field from a table that's not mapped to query descriptor.
Attribute name or Expression: [
Field LAST_UPDT_USER_C
Base QUERY OBJECT]
Wrong field: [LAST_UPDT_USER_C]

Hello,
I can't see what has changed in the area that throws the exception, as it seems similar to TopLink 11. Which version of TopLink was this working on, and what version of EclipseLink are you using?
If the field is mapped, why are you not using the attribute mapping via the builder.get("audit").get("auditMappingForTheField") instead of accessing the field directly?
The code itself seems to throw an exception because the table for the field cannot be found in the descriptor's table list You can try to define the table name in the field and see if this helps: builder.getField("Tablename.LAST_UPDT_USER_C"). If this works, please file a bug as it should not be neccessary or the error message needs to be fixed.
Best Regards,
Chris

Similar Messages

  • Query Key Definition when Inheritance is present

    Let me describe the domain model I am working with. There is a ProjectAgreement class that is a Contract (via extends) that is a VersionedObject (via extends). There is also a ProjectAgreementVersion class that is a ContractVersion (via extends) that is an ObjectVersion (via extends). The domain model also specifies that a VersionedObject has a collection of ObjectVersion instances.
    From the data model perspective, there are four tables of interest : CONTRACT, PROJECT_AGREEMENT, CONTRACT_VERSION, and PROJECT_AGREEMENT_VERSION. The persistent VersionedObject and ObjectVersion attributes are captured in these tables. The CONTRACT_ID column is present on both CONTRACT and PROJECT_AGREEMENT tables and is the primary key in both those tables. The CONTRACT_VERSION_ID column is present on both CONTRACT_VERSION and PROJECT_AGREEMENT_VERSION and is the primary key on both those two tables. There is also a CONTRACT_FK column on the CONTRACT_VERSION table to house the one to many relationship there.
    What I am attempting to do is add a OneToOneQueryKey to the Descriptor, at Descriptor definition time, for ProjectAgreementVersion so that I can write an expression of the form projectAgreementVersionExpression.get("projectAgreementQueryKey").get("someAspectOfAProjectAgreementInstance") ... While TOPLink doesn't complain at startup, I do get an invalid query key exception at run time when this relationship is attempted to be traversed via this query key.
    Here is one version of the query key as I have it defined against the ProjectAgreementVersion Descriptor:
    OneToOneQueryKey projectAgreementQueryKey = new OneToOneQueryKey();
              projectAgreementQueryKey.setName("projectAgreementQueryKey");
              projectAgreementQueryKey.setReferenceClass(ProjectAgreement.class);
              ExpressionBuilder x = new ExpressionBuilder();
              projectAgreementQueryKey.setJoinCriteria(x.getField("CONTRACT_VERSION.CONTRACT_VERSION_ID").equal(x.getParameter("PROJECT_AGREEMENT_VERSION.CONTRACT_VERSION_ID"))
              .and(x.getField("PROJECT_AGREEMENT.CONTRACT_ID").equal(x.getParameter("CONTRACT_VERSION.CONTRACT_FK"))));
              result.addQueryKey(projectAgreementQueryKey);
    Anybody have some ideas of the right combination of getField() and getParameter() calls against the ExpressionBuilder so that the query key is valid in TOPLink's eyes? Could the problem be that I must define the query key via a descriptor amendment method?
    Thanks,
    Doug

    James, thanks for the response. I had originally created and added the OneToOneQueryKey against the ProjectAgreementVersion Descriptor as the Descriptor was being built. I later attempted to defer the QueryKey creation and addition to the Descriptor to Descriptor amendment time, but got the same result.
    I also verify the Descriptor's QueryKeys after adding the OneToOneQueryKey and at the time an Expression is being built to use the QueryKey. At both times, a QueryKey exists by the given name as well as how you suggested. It appears that the QueryKey is present on the ProjectAgreementVersion Descriptor, but is simply invalid. Here is the stack trace this is generated when the ReadAllQuery is executed with the built Expression that uses this QueryKey:
    [java] [2005-07-06 15:53:31.407] LOCAL EXCEPTION STACK:
    [java] EXCEPTION [TOPLINK-6015] (TopLink - 9.0.3 (Build 423)): oracle.topli
    nk.exceptions.QueryException
    [java] EXCEPTION DESCRIPTION: Invalid query key [projectAgreementQueryKey]
    in expression.
    [java] QUERY: ReadAllQuery(ProjectAgreement)
    [java] at oracle.toplink.exceptions.QueryException.invalidQueryKeyInExp
    ression(Unknown Source)
    [java] at oracle.toplink.internal.expressions.RelationExpression.normal
    ize(Unknown Source)
    [java] at oracle.toplink.internal.expressions.CompoundExpression.normal
    ize(Unknown Source)
    [java] at oracle.toplink.internal.expressions.CompoundExpression.normal
    ize(Unknown Source)
    [java] at oracle.toplink.internal.expressions.SQLSelectStatement.normal
    ize(Unknown Source)
    [java] at oracle.toplink.internal.expressions.SubSelectExpression.norma
    lize(Unknown Source)
    [java] at oracle.toplink.internal.expressions.FunctionExpression.normal
    ize(Unknown Source)
    [java] at oracle.toplink.internal.expressions.CompoundExpression.normal
    ize(Unknown Source)
    [java] at oracle.toplink.internal.expressions.CompoundExpression.normal
    ize(Unknown Source)
    [java] at oracle.toplink.internal.expressions.CompoundExpression.normal
    ize(Unknown Source)
    [java] at oracle.toplink.internal.expressions.SQLSelectStatement.normal
    ize(Unknown Source)
    [java] at oracle.toplink.internal.queryframework.ExpressionQueryMechani
    sm.buildNormalSelectStatement(Unknown Source)
    [java] at oracle.toplink.internal.queryframework.ExpressionQueryMechani
    sm.prepareCursorSelectAllRows(Unknown Source)
    [java] at oracle.toplink.queryframework.CursorPolicy.prepare(Unknown So
    urce)
    [java] at oracle.toplink.queryframework.ReadAllQuery.prepare(Unknown So
    urce)
    [java] at oracle.toplink.queryframework.DatabaseQuery.checkPrepare(Unkn
    own Source)
    [java] at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown S
    ource)
    [java] at oracle.toplink.queryframework.ReadQuery.execute(Unknown Sourc
    e)
    [java] at oracle.toplink.publicinterface.Session.internalExecuteQuery(U
    nknown Source)
    [java] at oracle.toplink.threetier.ServerSession.internalExecuteQuery(U
    nknown Source)
    [java] at oracle.toplink.threetier.ClientSession.internalExecuteQuery(C
    lientSession.java:269)
    [java] at oracle.toplink.publicinterface.Session.executeQuery(Unknown S
    ource)
    [java] at oracle.toplink.publicinterface.Session.executeQuery(Unknown S
    ource)
    Any other ideas?
    Thanks,
    Doug

  • Re: Info set and query transport under same request number

    Hi,
      I would like to know the details about info set and query transport from development to quality using SAP Query:  Trnasport tool.my quesion is,
    Can i create all info sets and related queries under same request number or will it be created in diffrent request numbers?Please respond any body to my question.
    Regards,
    Suresh Kumar.

    No it is possible as per SAP.
    Please read follwoing help-
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    It is talking abou the Special Features of InfoCubes in InfoSets.
    For queries based on an InfoSet with an InfoCube, the system decides at runtime whether aggregates can be used for the InfoCube. This is the case if all the required InfoObjects of the InfoCube exist in an aggregate. The following InfoObjects are required:
    The key figures of the InfoCube selected in the query
    The characteristics of the InfoCube selected in the query
    The characteristics required for a join with other InfoProviders in the InfoSet.
    Furthermore, as a prerequisite for using aggregates, all the data required by an InfoCube must be readable using logical access. For an InfoCube within an InfoSet with InfoCubes, it is no longer possible to read part of the data from one aggregate and part of the data from another aggregate or the InfoCube itself.

  • ReadObjectQuery - Invalid query key

    Hello again :)
    A have still stuck on TopLink :(
    I created very simple example:
    DB:
    create table TESTIK
    ID NUMBER not null,
    NAZEV VARCHAR2(255),
    VERSION NUMBER
    I created new project in TopLink WorkBench, created new session.. I mean, there is no problem (but I'm not sure :) ) .
    I created new Dynamic WebApplication in Eclipse, using Glassfish server and framework JSF...
    My source:
    This is my entity, represent table TESTIK
    Testik.class:
    package toplink.model.entity;
    import java.io.Serializable;
    public class Testik implements Serializable { // implements Serializable
         private int id;
         private String nazev;
         private int version;
         public Testik() {
         public int getId() {
              return id;
         public void setId(int id) {
              this.id = id;
         public String getNazev() {
              return nazev;
         public void setNazev(String nazev) {
              this.nazev = nazev;
         public int getVersion() {
              return version;
         public void setVersion(int version) {
              this.version = version;
    This is for create session - i don't now, is it rights? :)
    SessionSetting.class:
    package toplink.services.settings;
    import oracle.toplink.sessions.Project;
    import oracle.toplink.threetier.Server;
    import oracle.toplink.tools.workbench.XMLProjectReader;
    public class SessionSetting extends oracle.toplink.platform.xml. jaxp.JAXPPlatform {
         public SessionSetting() {
         public Server getSession(){
         System.setProperty("toplink.xml.platform", "oracle.toplink.platform.xml.jaxp.JAXPPlatform");
              Project myProject = XMLProjectReader.read("c:/ecl_work/TopLink_Intro/src/META-INF/TopLink_Intro.xml", Thread.currentThread().getContextClassLoader());
              Server serverSession = myProject.createServerSession();
              return serverSession;
    And if I want used some query:
    public Testik findById(int id) {
              SessionSetting ss = new SessionSetting();
              Server session = ss.getSession();
    Testik testik = (Testik) session.readObject(Testik.class, new ExpressionBuilder().get("id").equal(1));
              return testik;
    But this return Exception:
    javax.servlet.ServletException: #{testikManagedBean.najdiTestik}: Exception [TOPLINK-6015] (Oracle TopLink - 11g (11.1.1.0.0) (Build 080909)): oracle.toplink.exceptions.QueryException
    Exception Description: Invalid query key [id] in expression.
    Query: ReadObjectQuery(toplink.model.entity.Testik)
    Where testikManagedBean.najdiTestik call findById(int id) !
    I tried used StoredProcedureCall, ReadObjectQuery, ValueReadQuery, ReadAllQuery and nothing works :(
    Example:
    public Collection<Testik> findAll(){
              SessionSetting ss = new SessionSetting();
              Server session = ss.getSession();
              Collection<Testik> testiky = session.readAllObjects(Testik.class);
              return testiky;
    but in this example, it works a long time and return:
    javax.servlet.ServletException: #{testikManagedBean.vsechnyTestiky}: Exception [TOPLINK-4002] (Oracle TopLink - 11g (11.1.1.0.0) (Build 080909)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Exception input/output: The Network Adapter could not establish the connection
    Error Code: 17002
    Query: ReadAllQuery(toplink.model.entity.Testik)
    I know what it means in this problem, but I do not know where is it, because in the workbench I can normally connect to the database... Is this problem in sessions or where?
    Please, I tried some very simple example, how to use TopLink and Queries and i'm still stuck.. I'm newbie in toplink and I do not know your advice...
    Please, could you help me with my problem?
    Thanks in advance

    I still cannot find a problem :(
    My Toplink_Intro.xml source is here :
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink:object-persistence version="Oracle TopLink - 11g (11.1.1.0.0) (Build 080909)" xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <opm:name>TopLink_Intro</opm:name>
    <opm:class-mapping-descriptors>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <opm:class>toplink.model.entity.Testik</opm:class>
    <opm:alias>Testik</opm:alias>
    <opm:primary-key>
    <opm:field table="TESTIK" name="ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy"/>
    <opm:attribute-mappings>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="TESTIK" name="ID" xsi:type="opm:column"/>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>nazev</opm:attribute-name>
    <opm:field table="TESTIK" name="NAZEV" xsi:type="opm:column"/>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>version</opm:attribute-name>
    <opm:read-only>true</opm:read-only>
    <opm:field table="TESTIK" name="VERSION" xsi:type="opm:column"/>
    </opm:attribute-mapping>
    </opm:attribute-mappings>
    <toplink:descriptor-type>independent</toplink:descriptor-type>
    <toplink:locking xsi:type="toplink:version-locking-policy">
    <toplink:version-field table="TESTIK" name="VERSION" xsi:type="opm:column"/>
    </toplink:locking>
    <toplink:instantiation/>
    <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
    <toplink:tables>
    <toplink:table name="TESTIK"/>
    </toplink:tables>
    </opm:class-mapping-descriptor>
    </opm:class-mapping-descriptors>
    <toplink:login xsi:type="toplink:database-login">
    <toplink:platform-class>oracle.toplink.platform.database.oracle.Oracle10Platform</toplink:platform-class>
    <toplink:user-name>tpl</toplink:user-name>
    <toplink:password>90412C7B7643C5A83BC1D672E05E1D31</toplink:password>
    <toplink:driver-class>oracle.jdbc.OracleDriver</toplink:driver-class>
    <toplink:connection-url>jdbc:oracle:thin:@172.17.2.69:1521:ORCL</toplink:connection-url>
    </toplink:login>
    </toplink:object-persistence>
    and sessions.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink-sessions version="11g (11.1.1.0.0)" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <session xsi:type="database-session">
    <name>MyDBSession</name>
    <event-listener-classes/>
    <logging xsi:type="toplink-log">
    <log-level>fine</log-level>
    </logging>
    <primary-project xsi:type="xml">C:/ecl_work/TopLink_Intro/src/META-INF/TopLink_Intro.xml</primary-project>
    <login xsi:type="database-login">
    <platform-class>oracle.toplink.platform.database.oracle.Oracle10Platform</platform-class>
    <user-name>tpl</user-name>
    <password>90412C7B7643C5A83BC1D672E05E1D31</password>
    <sequencing>
    <default-sequence xsi:type="table-sequence">
    <name>Default</name>
    </default-sequence>
    </sequencing>
    <driver-class>oracle.jdbc.OracleDriver</driver-class>
    <connection-url>jdbc:oracle:thin:@172.17.2.69:1521:ORCL</connection-url>
    <struct-converters/>
    </login>
    </session>
    </toplink-sessions>
    Any idea, why I have still this exception:
    javax.servlet.ServletException: #{testikManagedBean.najdiTestik}: Exception [TOPLINK-6015] (Oracle TopLink - 11g (11.1.1.0.0) (Build 080909)): oracle.toplink.exceptions.QueryException
    Exception Description: Invalid query key [id] in expression.
    Query: ReadObjectQuery(toplink.model.entity.Testik)
    in this code?
    Testik testik = (Testik) session.readObject(Testik.class, new ExpressionBuilder().get("id").equal(1));
    Thanks in advance
    Edit:
    And if I used this code:
    Collection<Testik> testiky = session.readAllObjects(Testik.class);
    then returns this exception:
    javax.servlet.ServletException: #{testikManagedBean.vsechnyTestiky}: Exception [TOPLINK-4002] (Oracle TopLink - 11g (11.1.1.0.0) (Build 080909)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00936: missing word
    Error Code: 936
    Call: SELECT FROM TESTIK
    Query: ReadAllQuery(toplink.model.entity.Testik)
    Edited by: KLD on Nov 10, 2008 12:34 AM

  • BBZ10 and Q10 key Features.

    Here are some key features of Blackberry Z10 and Q10:
    1) The Z10 which has a 4.2-inch screen(1,280 x 768 display), will be sold at an unsubsidized price of $599, but can be obtained through some carriers for $149 with a three-year contract. Pricing for the Q10, the keyboard-equipped sibling, was not made available.
    2) At 130 millimeters (5.1 inches) in length and weighing 137 grams (4.8 ounces), Z10 is slightly longer and heavier than the iPhone 5. On the other hand, Blackberry Q10 has a squarish screen measuring 3.1 inches (7.8 centimeters) diagonally.
    3) The smartphones are being offered with a 1.5GHz Qualcomm MSM8960 dual-core CPU with 2GB of RAM.
    4) The BlackBerry smartphones have 16 gigabytes of storage, plus a memory-card slot for expansion. However, the phones don't support cards larger than 32GB.
    5) On the back is a 8-megapixel camera which is capable of taking videos of 1080p. The camera is located on the top-left corner of the back and paired with a LED flash. The front has a 2-megapixel camera which is capable of recording videos of 720p.
    6) It has Multilanguage support, and users can flick words with one thumb. Also improved are the picture editor, and a multitude of other features that positions the device both as a consumer device and an enterprise device simultaneously.
    7) The glass is designed exclusively for Z10, it is supposedly thinner but stronger than plastic.
    8) The device aggregates information intuitively; it recognises and pulls up all the connections into the contacts, like the last email, last meeting, last Twitter post.
    9) The battery life is estimated at 10 hours talking time and 13 days on standby. Another feature is a mini-HDMI port to allow connections to a television or projector.
    10) Apps like Facebook have been completely integrated with the BlackBerry 10 hub. All emails and notifications from such applications as Twitter and Facebook go to the BlackBerry Hub, a nerve center accessible with a finger swipe even if you have another application open. One can peek into it and open an email, or return to the previous application without opening the email. The company said that more than 70,000 apps are available for users in the BlackBerry World.

    Thanks for your answer to my desperate plea... I actually discovered this 'Expert' feature by following a Youtube how-to video  later that evening. So, still appreciate that you care enough to reply. I'm just learning this software application and will continue watching the many videos from the Youtube source. Do you by any chance know what 'validation' provides as an advantage?Thanks again.Dave
    Date: Sat, 11 Jan 2014 20:10:39 -0800
    From: [email protected]
    To: [email protected]
    Subject: Can't validate and get key features in PSE12
        Re: Can't validate and get key features in PSE12
        created by mytaxsite.co.uk in Photoshop Elements - View the full discussion
    You need to be in Expert mode to get all the features working.
    this is done by clicking on the Expert Mode tab as shown in this picture:
      http://forums.adobe.com/servlet/JiveServlet/downloadImage/2-6004330-533916/336-57/2014-01- 12_0408.png
      I agree Amazon has normally the best price when it comes to software and other books.  NEVER EVE buy from Adobe direct.
    Good call from your part.
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6004330#6004330
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6004330#6004330
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6004330#6004330. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Photoshop Elements at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How to use the validation work in Both TAB and Mouse keys in Forms6i

    Hi,
    I have a validation script once it's validated it should execute the query.But using When-Validate-Item i can't use execute_query.I am able to use the validation in Key-Next-Item trigger but if the user moves the cursor using mouse then it's not working.
    How to use the validation script working in Both Scenarios(Tab and Mouse keys).
    Can anyone please give inputs to rectify the above issue?.

    So you have multiple fields, but on at least one of them if it's valid you immediately want to execute the query?
    You could create a hidden field in a control block Query_Now default 'N'. In a WHEN-VALIDATE-ITEM on your item, if it's determined to be valid, then set Query_Now to 'Y'.
    In a WHEN-NEW-ITEM-INSTANCE at block level, check if Query_Now is 'Y'. If it is then execute the query (and set it back to 'N').

  • Difference between Unique key and Primary key(other than normal difference)

    Hello,
    1).Can any one tell me any other difference between Unique key and Primary key other than it having NULLs.
    2). What is the difference the words 'DISTINCT' and 'UNIQUE' in a sql query.
    Thanks in advance.

    Hi
    If you don't believe me than see the documentation in
    OTN.
    Ott Karesz
    http://www.trendo-kft.hu
    SQL> create table scott.tbl_clob
      2  (sss CLOB)
      3  /
    Tabelle wurde angelegt.
    SQL> insert into scott.tbl_clob values('wrwrwrw')
      2  /
    1 Zeile wurde erstellt.
    SQL> insert into scott.tbl_clob values('wrwrwrw')
      2  /
    1 Zeile wurde erstellt.
    SQL> select distinct sss from scott.tbl_clob
      2  /
    select distinct sss from scott.tbl_clob
    FEHLER in Zeile 1:
    ORA-00932: nicht übereinstimmende Datentypen
    SQL> select unique sss from scott.tbl_clob
      2  /
    select unique sss from scott.tbl_clob
    FEHLER in Zeile 1:
    ORA-00932: nicht übereinstimmende Datentypen
    SQL> select distinct to_char(sss) from scott.tbl_clob
      2  /
    TO_CHAR(SSS)
    wrwrwrw
    SQL> select unique to_char(sss) from scott.tbl_clob
      2  /
    TO_CHAR(SSS)
    wrwrwrw
    SQL>

  • Custom domains and primary keys

    hi to all;
    I've in troubles, with custom domains and the fact that sometimes, they must be as primary keys.
    Searching in this news i see that we have to code, equals() and hashcode() methods, trying it i've got better behaviors , but still in problems.
    My domain is an String , in "show time" i need it masked and query time ( as in database it is stored without mask ) i need it without any mask;
    findByKey method i never know when it will work and when it will not;
    Could some one point me to a right solution ?
    fowards thanks

    Dan:
    Yes. Provide the correct equals() and hash() is the most important thing you need to do. There are other things you need to think about if the domain is NOT a scalar domain (single value). But, BC4J assumes that the PK is a scalar value, so your custom domain should be a scalar value value ==> equals and hash are two thing you'd need.
    Thanks.
    Sung

  • Multi provider objects and restricted key figure definition

    I have the following scenario:
    1. I have a multi provider which is used as a template to build a second multiprovider the difference being one of the part provider cubes is replaced by a new cube
    2. There is a query built off the original multi provider which consists of a restricted key figure.  The definition of the restricted key figure is as follows
        Characteristic 1 - restricted to records with value 'A'
        Characteristic 2 - restricted to records with value 'Blue'
        Key Figure - Total Amount
    3. If I go to the original multiprovider and look at how the characteristics are identified and the key figure assigned the details are as follows
         Characteristic 1 - identified from all part providers including the part provider to be replaced
        Characteristic 2 - identified from all part providers including the part provider to be replaced
        Total Amount - assigned from two part providers (which are also involved in the identification of   Characteristic 1 and 2)  not including the part provider to be replaced
    4. In the new multi provider the details are as follows
    Characteristic 1 - identified from all part providers excluding the replacement part provider
        Characteristic 2 - identified from all part providers excluding the replacement part provider
        Total Amount - assigned from two part providers (which are also involved in the identification of   Characteristic 1 and 2)  not including the part provider to be replaced
    My thoughts are that it does not matter that Characteristic 1 and 2 cannot be identified from the new part provider since as long as the two part providers which are used to assign Total Amount are available in the new multi provider the values shown from the restricted key figure will be the same.  Is this correct? Thanks

    Hi,
    Yes this is correct. As long as you are reporting on Total Amount, the replacement cube will not make a difference because you never identified total amount from it. Did you face any issues?

  • Can we create range variable for Query Key Date

    Hello Gurus,
    Can we create a range variable for Query Key Date ? when I tried to give a range of values for Query Key Date, I am unable to find Range Values option. I found only Single Values.
    so, Please let me know if we can use Range variables for Query Key Date ??
    Thanks in advance,
    Regards,
    Aarthi

    Hi Aarthi,
    This is relevant for the time dependant master data that is being pulled in thw query. Like if you are using a nav attr in the query and this nav attr is time dependant, then which record (from the char master data) is to be pulled into the report, depends upon the key date that you specify.
    The default key date value is the date on which the query is executed, that is <Today>.
    Hope this helps...

  • Invalid query key

    I have the following class hierarchy
    A has a one-to-many relationship with B, B has a one-to-one relationship with C, C has a one-to-one relationship with D and D has a one-to-one relationship with E. B, C, D, and E each have a derived class B1, C1, D1 and E1 respectively.
    I am getting Invalid Query Key exception while trying to access a query key defined in E1 using the following toplink code
    ExpressionBuilder.get("A").anyOf("B").get("C").get("D").get("E").get("aFieldInE1");
    Any help on this will be greatly appreciated.
    Thanks,
    Milan Dattawade.

    I assume by "derived class" you mean subclass. If so, then this query breaks polymorphism. Although you may know that you only want A's that have an E that is specifically E1, the language doesn't know that.
    Luckily there is an easy way to handle this. You can create a Query Key in the class E that has the information about the subclass attribute in E1 that you want to be able to query through. In other words, hint to TopLink that you'd like to occasionally query and break polymorphism by assuming you're querying on specific subclass attributes.
    See:
    http://download-west.oracle.com/docs/cd/B10464_01/web.904/b10313/queries.htm#1108755
    (or search your PDF for Foundation Library for "DirectQueryKey") See Javadoc for DirectQueryKey too.
    - Don

  • Invalid Query Key when using ReadAllQuery.addOrdering()

    Hi,
    I have an object called Request mapped to the Request table and a field within it called creator which is mapped to the User object with a 1-1 mapping. the User object is mapped to the user table.
    Now when I do addOrdering() with an expression as below and execute the ReadAllQuery, I get an exception which says "Invalid Query Key[lastName]".
    raq.addOrdering(raq.getExpressionBuilder().get("creator").get("lastName").ascending());
    where raq is an instance of ReadAllQuery.
    Have anyone experienced this? Any help would be much appreciated.
    Thank you,
    Sanjay Mathew.

    I double checked and the attribute names look ok.
    Please see the code below:
    SearchCriteria p_searchCriteria = new SearchCriteria();
    sc.setSortAttribute (
    "m_creatorUser.m_lastName,m_creatorUser.m_firstName");
    sc.setSortOrder(SearchCriteria.ASCENDING);
    ReadAllQuery raq = new ReadAllQuery(Request.class, queryExpression);
    if (p_searchCriteria.getSortAttribute() != null &&
    p_searchCriteria.getSortAttribute().trim().length() > 0) {
    StringTokenizer st1 =
    new StringTokenizer(p_searchCriteria.getSortAttribute(), ",");
    while (st1.hasMoreTokens()) {
    ExpressionBuilder eb = raq.getExpressionBuilder();
    String sortattr = st1.nextToken();
    StringTokenizer st2 = new StringTokenizer(sortattr, ".");
    Expression orderexpr = null;
    while (st2.hasMoreTokens()) {
    String st2Str = st2.nextToken();
    if (orderexpr == null)
    orderexpr = eb.get(st2Str);
    else
    orderexpr = orderexpr.get(st2Str);
    if (p_searchCriteria.getSortOrder() == null ||
    (p_searchCriteria.getSortOrder() != null &&
    p_searchCriteria.getSortOrder().equals(SearchCriteria.
    ASCENDING))) {
    orderexpr = orderexpr.ascending();
    } else {
    orderexpr = orderexpr.descending();
    raq.addOrdering(orderexpr);
    I tried creating the expression with hard coded attribute names as well like this:
    raq.getExpressionbuilder().get("m_creatorUser").get("m_lastName").ascending()
    In both cases I get "Invalid query key" exception.
    Sanjay.

  • Primary Key and Foreign Key Constraints

    Hi All,
    I would like to know PRIMARY KEY and FOREIGN KEY constraints on existing oracle tables. Could any one suggest me how to find out.
    Thanks,
    RED

    You can query DBA_CONSTRAINTS to get a list of all the constraints on table A and/or table B. The documentation I linked to gives a full list of the data you can see in DBA_CONSTRAINTS, but it includes things like the referenced table name and referenced constraint name for a foreign key constraint. If A is a parent of B or B is a parent of A, you could match up the parent's primary key constraint to the child's foreign key constraint.
    More generally, though, if you don't know that one of the tables is a parent of the other, figuring out how to join the two tables is probably not something that can be done using just the Oracle data dictionary. You would probably need an understanding of the data model being used to figure out what intermediate table(s) needed to be joined in order to relate rows in A to rows in B.
    Justin

  • Dim and Fact Key sync and Clean up

    Hello all,
    We have some really bizarre thing going on in our DW environment, same ETL jobs is running twice and because of extremely bad design with no constraints at all, we have lots of duplicate records getting inserted.
    So the actual row count in DIM table should be 3 mill, but because of these multiple runs the count is like 9 mill rows. I'll illustrate this with an example.
    This is the Dimension table, column (HEADER_ITEM ,LINE_ITEM) is the NATURAL_KEY, while DIM_SK is the PK, as you can see the table has three occurrence of NATURAL_KEY with increasing PK, but some time it may have same PK too, as there is no actual PK constraint on this table.
    CREATE TABLE SABEGH_DIM
    DIM_SK DECIMAL(10),
    HEADER_ITEM VARCHAR2(10),
    LINE_ITEM VARCHAR2(10)
    INSERT INTO SABEGH_DIM VALUES (1,'A','X');
    INSERT INTO SABEGH_DIM VALUES (2,'A','X');
    INSERT INTO SABEGH_DIM VALUES (3,'A','X');
    INSERT INTO SABEGH_DIM VALUES (4,'B','Y');
    INSERT INTO SABEGH_DIM VALUES (5,'B','Y');
    INSERT INTO SABEGH_DIM VALUES (6,'B','Y');
    INSERT INTO SABEGH_DIM VALUES (11,'C','Z');
    INSERT INTO SABEGH_DIM VALUES (11,'C','Z');
    INSERT INTO SABEGH_DIM VALUES (11,'C','Z');
    And then there is a FACT table too, which is one-to-one with this DIM.
    CREATE TABLE SABEGH_FACT
    FACT_SK DECIMAL(10),
    COL1 VARCHAR2(10),
    COL2 VARCHAR2(10),
    COL3 VARChAR2(10)
    INSERT INTO SABEGH_FACT VALUES (1,'RAIN','DIDI', 'FF');
    INSERT INTO SABEGH_FACT VALUES (3,'RAIN','DIDI', 'FF');
    INSERT INTO SABEGH_FACT VALUES (5,'CNG','ZION','TEST');
    INSERT INTO SABEGH_FACT VALUES (11,'CNG','ZION','TEST');
    What I would like to do some clean up, on both these tables.
    SABEGH_DIM :
    1. Preserve the Maximum Key within the group of same NATURAL_KEY in DIM table, if there are dups, load only one record. So my SABEGH_DIM table finally should have these values:
    3......A.....X
    6......B.....Y
    11....C.... .Z
    SABEGH_FACT:
    Since this FACT table, may still refer the old PK from the DIM, we need to change the PK appropriately, so that it ties up with the DIM correctly. SABEGH_FACT should contain now this data set, which is the final results.
    i replaced old keys with new PK from the Dim, and if after this operation there are dups in FACT, load only one occurrence.
    3.......RAIN........     DIDI.........FF
    6.......CNG........     ZION........TEST
    11.....CNG........     ZION........TEST
    These table are really huge, so it would be nice to have some fast query, I can add INDEXES, CONSTRAINTS; if it helps to speed up the process. Also, I would like to have a cross-reference table, which as both old keys and new keys, there are other FACT tables, which are still referring the OLD PK from this DIM table, so I have to update that FACT table key as well,
    DIM_PK.......HEADER_ITEM.......LINE_ITEM.......MAX_DIM_PK
    1......A.....     X.....3
    2.....     A.....     X.....3
    3.....     A.....     X.....3
    4.....     B.....     Y.....6
    5.....     B.....     Y.....6
    6.....     B.....     Y.....6
    11.....C.....     Z.....11
    11....     C.....     Z.....11
    11.....C.....     Z.....11
    So, I'll use this Cross-Reference table to update KEY in other FACT table.
    Thanks a lot!
    Sabegh

    What I would like to do some clean up, on both these tables.Please proceed to do so.

  • Primary Key and Chronological Key for Time Dimension

    Could someone please shed light whether it's better to use normal PK or Calendar Date (which is a chronological key on the most detailed level). I tried both and haven't noticed any difference. But my understanding is that I still need to have the PK key on the most detailed level in time hierarchy.
    Thanks

    Matt,
    the PK of the Time Dimension is a regular sequence numeric key. I have it defined as a logical PK for the dimension. However, I guess I was talking about hierarchy key. I tested it either way and the query time is the same. So I guess it doesn't really matter.
    --------Year
    Year (chronological key and primary key)
    ------------------Quarter
    Quarter (key)
    Quarter+Year (primary key, chronological key)
    ---------------------------------Day Detail
    PK (key)
    Date (primary key , chronological key)
    I hope it makes sense.

Maybe you are looking for

  • How can i get the source code from java concurrent program in R12

    Hi 2 all, How can i get the source code from java concurrent program in R12? like , "AP Turnover Report" is java concurrent program, i need to get its source code to know its logic. how can i get its source code not the XML template? Regards, Zulqarn

  • Photoshop web help is illegible

    Adobe seem to have no interest in people with poor eyesight. Photoshop 6 has arrived with the same tiny icons are CS5. Worse, the web help is completely illegible, even with a magnifying glass. It is presented as gray on gray, with a font that is som

  • Hdmi audio

    when i connect my hdmi cable i no longer get sound through the t.v.

  • Installation of forms 10G

    Hi all, I am struggling to install Forms 10G on Windows server 2008 machine. Can you please help me finding the solution. Its very urgent and nobody in our team or onsite team knows about it. Please, its very urgent and really helpful to me. Thank yo

  • Nokia Service Layer issue with NSU

    Well i have just installed NSU and ran it for the first time and this is the error message i am getting while the splash screen is displayed. "Nokia Service Layer Host Process has encountered a problem and needs to close. We are sorry for the inconve