Read a realtionship field during partial object reading

I have two classes. A to B is a one-to-one mapping. Table for A holds a foreign key to object B. I want to do a partial object reading which will read the an attribute for A and an database field which is the foreign key (from A to B).
For the A's attribute, I could use the
query.addPartialAttribute();
How should I specify the partial reading for the foreign key? I do not want to load the associated B into database. I just want to load the foreign key.
help is appreciated.
jason

Jason,
Partial object querying allows you to specify attributes of your source and dependent objects based upon the mappings you have configured. It does not provide support for specifying database fields without mappings as there is no place to put the retrieved value.
To accomplish what I believe you are asking you have a couple of options:
1. Use ReportQuery as this will allow you to specify database fields or any query key without necessarily mapping it into your object model with an attribute.
2. Add an attribute to your source class that will hold the FK value. This would mean that the FK and the relationship are held in the object and one would need to be configured as read-only. I dislike this solution as it corrupts your object model.
Doug

Similar Messages

  • [ORA-22905] How to read a field of an object inside another object?

    Greetings,
    I'm a student and in a current exercise we have to work with the Object Oriented Programming functionality of Oracle.
    In the database we defined an object type, which is then considered inside another object type. The thing is, that I cannot read an attribute of the inner object. I've read tens of websites but none of them have helped so far. I've read the PL/SQL User Guide and Reference document also.
    The inner object is defined as follows:
    create type address_t as object (
            street varchar(50),
            city varchar(50),
            pcode number(5,0)
            );The outer object has an object of type address_t inside it:
    CREATE TYPE professor_t as OBJECT(
              code number(2),
              p_name varchar(50),
              address address_t,
              );Also, there is a table named PROFESSORS that stores objects of type professor_t
    First of all, with a simple testing SQL statement I can see the data inside the object professor, even the object address_t:
    SELECT * FROM PROFESSORS WHERE CODE = 13;returns the following:
    CODE    |         NAME      |       ADDRESS
    13      |         JOHN     |       MYSCHEMA.ADDRESS_T('FIFTH AVENUE','NEW YORK',12345)The thing is, I want to read the field street of the object address (of type address_t) inside professor (of type professor_t).
    I could see everywhere that the way to go is to use point notation, and I've seen examples about the command VALUE, but none of the following SQL statements work:
    SELECT VALUE(ADDRESS.STREET) FROM(
      SELECT CODE,P_NAME,ADDRESS FROM PROFESSORS WHERE CODE = 13);
    SELECT ADDRESS.STREET FROM PROFESSORS WHERE CODE = 13;
    SELECT PROFESSOR.ADDRESS.STREET FROM PROFESSORS WHERE CODE = 13;I'd really appreciate if someone could show me how to access the values of the field of the object inside an object.
    Thanks in advance,
    - David
    Edited by: 858176 on May 11, 2011 6:53 PM Formatting

    Great, this worked so far.
    It is curious that you wrote 'profesores' but that is the actual name for the variable. I translated everything to english in order to post it here.
    So, the statement is:
    select value(t).DIRECCION.CIUDAD from profesores t;And It returned:
    VALUE(T).DIRECCION.CIUDAD                         
    Valencia                                          
    New York
    TijuanaAnd, applying the VALUE command to the statement:
    select codigo,
    nombre,
    value(t).DIRECCION.CALLE,
    value(t).DIRECCION.CIUDAD,
    value(t).DIRECCION.CP
    from profesores T WHERE T.CODIGO = 13;Resulting in:
    CODIGO                 NOMBRE                                             VALUE(T).DIRECCION.CALLE                           VALUE(T).DIRECCION.CIUDAD                          VALUE(T).DIRECCION.CP 
    13                     Pepito Pérez                                       Calle de los Rosales 0                           Valencia                                           46023                  That is EXACTLY what I needed.
    Thanks Thomas, It was really helpful !
    Edited by: 858176 on May 11, 2011 7:46 PM

  • Partial object read ant one-to-many relationship

    Hi,
    does Toplink support partial object reading for one-to-many links?

    Not really, but it might work in 10.1.3 or 11g preview. You can use joining (join fetch) on 1-m (10.1.3) and m-m (11g).
    In 11g you can use fetch groups that do support 1-m and m-m, and also let you join fetch or batch the relationship. You need to use weaving to use fetch groups.

  • BADI for changing fields during Creation of BP in CRM

    Hello to everyone,
      I need to find a BADI (or other way) to default several fields during BP creation in CRM (4.0 SR1 SP9). The fields I will like to set are TAX TYPE, TAX NUMBER, TAX CATEGORY, etc.. I have found the BADI BUPA_TAX_UPDATE but i dont see any suitable parameters (structures) to changes these fields. Please advice and thanks in advance.

    Hi
    If you use function BUPA_NUMBERS_GET then your BP number will already be buffered and you can avoid a DB read. It may also be that the BP is not in the DB yet anyway.
    You can only pass one GUID in at a time - loop through IT_CHANGED_INSTANCES into a variable of type BU_PARTNER_GUID and pass that into the function as input parameter IV_PARTNER_GUID.
    Cheers
    Dom

  • PPCO0007 User Exit for  Changing Header Fields During Order  (CO40)

    .. Hi !!!!
      I need your help or suggestions,
      I need to change the standar order  before to save, i found the user exit PPCO0007,
      i assign the new value for the order, but when finish the fuction, EXIT_SAPLCOZV_001, the new values are
      lost, and finally the system set the standard order.
        Someona know how can change the order and the the batch.
         Thanks
    Noemí Huerta

    Hi Noemi
    You can use the enchancement PPCO0007 (exit when the production order is saved).
    Use the function module EXIT_SAPLCOZV_001 (User Exit for Checking or Changing Header Fields During Order Save) to update the field priority starting the information in the material-customer info record.

  • Error during precalculation Object variable or With block variable not set.

    Hi
    We are tyring to set up a precal server for broadcasting. The precal server is running on a windows 2003 server and the service is running under a local admin account.
    When we try to run a test workbook, we get the email with the workbook, but there is no data in it.
    The Precal server shows us the following log:
    Connection transfer server BIPRD service sapgw00 system number
    S:RSRPREC:000 BIPRD sapgw00  ALEX
    S:RSRPREC:000 BIPRD sapgw00  ALEX
    S:RSRPREC:000 BIPRD sapgw00  ALEX
    S:RSRPREC:000 BIPRD sapgw00  ALEX
    S:RSRPREC:000 BIPRD sapgw00  ALEX
    Precalculation request type: E, printer: , variant:
    Request dispatched to precalculation DLL
    S:RSRPREC:000 E   ALEX
    S:RSRPREC:000 E   ALEX
    Unresolved exception occurred on the precalculation server
    E
    Error during precalculation Object variable or With block variable not set.
    S:RSRPREC:000  Object[] args  String[] paramnames  Boolean[] CopyBack) ALEX
    S:RSRPREC:000  DataTable iServerProperties  DataTable iVarTable)  Boolean[] CopyBack) ALEX
    S:RSRPREC:000  DataTable iServerProperties  DataTable iVarTable)  Boolean[] CopyBack) ALEX
    S:RSRPREC:000  DataTable iServerProperties  DataTable iVarTable)  Boolean[] CopyBack) ALEX
    Application server requires status report
    Application server requires status report
    Has anyone seen this issue?
    Please let us know, if anyone has any ideas.
    Thanks

    Does the query in the workbook require variable input, and, if so, have you provided a variant in the precalculation setting?

  • Java is a Partially Object-Oriented Programming (True/False)

    Hi everybody,
    Many of them saying that Java is not purely Object-Oriented Programming.
    I am very much confusing on that, so please help me to confirm that "Java is a Partially Object-Oriented Programming Language".

    JAVA_NV wrote:
    gopivista wrote:
    Hi everybody,
    Many of them saying that Java is not purely Object-Oriented Programming.
    I am very much confusing on that, so please help me to confirm that "Java is a Partially Object-Oriented Programming Language".Java is not purely Object-Oriented Programming,for this two reasons are there
    one is we cant create Objects to the primitive data types and there is no multiple Inheritance concept .While there are many definitions of "purely object oriented," and no on widely accepted standard, I've never heard one that requires multiple inheritance. That would NOT be a reason why Java is not fully OO.

  • How to hide the Parameter field during Run time?

    Hi,
    How to hide the Parameter field during Run time?
    I have a parameter field which behaves differently depending on the User logged in.
    I am using reports 10G
    For ex: I have 3 field created in JSP
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user = 'SUPER show all the parameter
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user is 'GATEKEEPER" Just show
    PROVIDER
    FROM DATE
    END DATE
    Can I do that?
    Please help
    Thanks.
    KK

    hi, i'm not familiar much with JSP. but i think workaround is to create two window one which have 4 fields and the other which have 3. if user is SUPER then call the first screen otherwise if user is GATEKEEPER then call the second screen.

  • Adobe Form - Path of the context field from the object pallate

    Hi,
    I am trying to modify the standard adobe(MR_PRINT_INSERS) form as per the requirement.
    There are many tables and fields in the context.
    I want to know the path to which the the UI elements(library pallate) are binded.
    I can see the field name in object pallate but the place from where that object is taken is not shown.
    For Eg: I can see the field WRBTR in the object pallate of the text UI element of library pallate but I couldnot figure it out from which table of context they are reffering, as their are many tables in the context which have WRBTR.
    Can you please let me know how to figure out exact path to which table the field is binded.
    Thanks & Regards,
    kiran Kumar K

    Hi Tamas,
    I checked the mentioned form and, as this table is setted as TABLEROW and some of its cells are static, is not possible to change the column size in the layout or even though changing it directly in the XML file, cell by cell. I was trying it.
    For example, choose the Cell6 of TABLEROW[0] and click on tab 'XML Source'. You will see this statement:
    <draw colSpan="3" h="16.3166mm" name="Cell7" w="22.225mm">
    You can try to change the value 'colSpan' according to your requirement.
    This table size is not modifiable because it was developed to it.
    I believe that Diego's suggestion can help in this case, if you are having problems to print the entire table on the page.
    Regards,
    Lucas Comassetto.

  • Please tell me how I can set an array field to an object?

    Hi,
    Please tell me how I can set the plID (an array field) to an object? This result is for one Agent object. Suppose the Agent object only has these two fields.
    If a sql query result is something like this (which is one object).
    agent_last PLID
    smith      5
    smith               6
    smith               7
    Agent agent = new Agent();
    StringBuffer sql = new StringBuffer();
    int count = getPLNo(agentID);// # of the query result
    try {
    SQL tsql = new SQL();
    Connection conn = tsql.getConnection();
    sql.append("SELECT agent_last, b.PLID ");
    sql.append("FROM Agent a, PL b ");
    sql.append("where a.agent_id = b.agent_id ");
    sql.append("and a.agent_id = ? ");
    PreparedStatement st = conn.prepareStatement(sql.toString());
    st.setInt(1, agentID);
    ResultSet rs = st.executeQuery();
    while (rs.next()) {
    agent.setAgentID(agentID);
    agent.setAgentLast(rs.getString(1));
    for ( int i = 0 ; i < count; i++ ) {               //how to do it?
    agent.setPrivateLabelID(new int[] {rs.getInt(2)});//how to do it?
    st.close();
    rs.close();
    tsql.close();
    } catch (SQLException e) {
    System.out.println("SQL: " + e.getMessage());
    throw new Exception(e.getMessage());
    } catch (Exception e) {
    System.out.println("Except: " + e.getMessage());
    throw new Exception(e.getMessage());
    return agent;
    }

    If that's not what you're looking for, then you get
    what you pay for. :-)Hi fmeyer75,
    Thank you very much for your input. That's exactly what I was looking for and it works!!!!
    For anyone who has similar issue, I changed the code a little to make it work with my existing ones. I never splited queries before, so please tell me if there's a better way to handle it.
    I keep the first half part and changed a little for the second half. Below is what I use now
    sql.setLength(0);
    sql.append("SELECT PLID ");
    sql.append("FROM PL ");
    sql.append("where agent_id = ? ");
    List list = new ArrayList();
    PreparedStatement st2 = conn.prepareStatement(sql.toString());
    st2.setInt(1, agentID);
    ResultSet rs2 = st2.executeQuery();
    while (rs2.next()) {
                 list.add(new Integer(rs2.getInt(1)));
    agent.setPrivateLabelID(new int[list.size()]) ;
    for ( int i = 0 ; i < list.size(); i++ ) {
    agent.getPrivateLabelID() = ((Integer)
    list.get(i)).intValue() ;
    st.close();
    rs.close();
    st2.close();
    rs2.close();

  • Concatnate two fields during data loading - SQL Loader

    How to concatnate two fields(Date and Time ) to a Timestamp field during loading?
    Data is in text format and it contains variable data.
    Example Data
    abc#10.02.2003#16:23:12.12345#dsd#
    Execepted output in a timestamp field
    10.02.2003 16:23:12.12345

    Let me try:
    LOAD DATA
    INFILE 'myfile.dat'
    INTO TABLE mytable
    FIELDS TERMINATED BY '#' OPTIONALLY ENCLOSED BY '"'
    (col1 CHAR(3),
    col2 TIMESTAMP "dd.mm.yyyy hr24:mi:ss.ms" "col2||field1",
    field1 FILLER CHAR,
    col3 CHAR(3))     
    The filler datatype tells sqlldr that this part of the record is not data to be loaded in the table.
    P.S. I am not sure if I got the timestamp format string right.
    P.P.S. This will only work with 9i as 8i and below do not have a timestamp datatype.
    P.P.P.S. Your other option would be to define an external table (again 9i) the do an insert statement into the final table: insert into mytable (select col1, col2||col3, col4 ...

  • P_GROUP Field in S_DEVELP Object?

    Hi Experts,
    When user needs a S_DEVELOP Object,provides the SU53 with P_Group as <dummy>.We also provides the user with S_Develop with P_GROUP as blank.Even P_GROUP field is blank, user is able to work.Then what is the purpose of P_Group field in S_Develop?
    Kindly help me.
    When I searched in Internet,I am not able to get enough information about P_GROUP field on S_DEVELOP Object.
    Regards,
    Karthika

    p_group in s_program is used for submitting the report, protecting variant maintenance, scheduling it in a background jobstep, etc. So, it is for using the report.
    p_group in s_develop is used for the development environment of the report, such as maintaining text elements, navigation in where-used-lists, changing the report attributes - which include the authorization group itself.
    If an auth group has been set via report RSCSAUTH, then it implies an intention to use it for S_PROGRAM control in SA38, SM37, etc. S_DEVELOP works better using packages and object types in my opinion.
    If you attempt to change the auth group via SE38, SE80 etc when it has already been set from RSCSAUTH, then the system will warn you. But you can accept the warning and create an inconsistency for a while... rather always use RSCSAUTH for both when making changes.
    S_PROGRAM is more usefull for you to use the group in security, but S_DEVELOP is stronger. Please be carefully with all aspects of object S_DEVELOP.
    Cheers,
    Julius

  • Can't add database field or text object to a report (new and existing)

    We have Crystal Report 8.5 and when trying to modify an existing report or create a new report, I can't seem to add any database fields or text objects in my report.  I get a prohibition symbol (circle with a backslash inside it) when I hover over the report.  Has anyone encoutered something like this? Any suggestions?  Thank you.

    Do you have two monitors?
    I had this problem if I tried to open crystal in the second monitor, move it back to primary monitor and it should be OK.
    Ian

  • Skipping fields during content conversion

    is it possible to skip fields during content conversion in file sender adapter?
    The case is, the CSV file contains 300+ field and i only need 10. Therefore i have created a datatype with those 10 field.
    I was hoping to skip the fields i do not need during content conversion.
    If this is not possible i see no other than to create a datatype with 300+ fields by hand. Which will take all day!
    Hopefully there is a solution, since i could not find what i needed on the SAP Help or SDN.
    Thanks in advance for all your time!

    Hi M,
    is it possible to skip fields during content conversion in file sender adapter?
    No .. this is not possible during FCC.
    The case is, the CSV file contains 300+ field and i only need 10. Therefore i have created a datatype with those 10 field.
    Hopefully there is a solution, since i could not find what i needed on the SAP Help or SDN.
    Well, you can give it a shot. There are freewares available on internet, which can transform the CSV file to XSD. Then you can import that XSD structure in ESR.
    The only point is that your source CSV file must be having the header (with all field names on it).
    I had done this with another integration tool, no idea how it will work with PI. But it's worth giving it a try.
    If this is not gonna happen, then you have no other option but to create complete DT manually or use adapter module (not recommended for such cases).
    Regards,
    Neetesh

  • User defined fields in Resource object; Resource object form

    Hi,
    Can anyone tell me what is the purpose of having user defined fields for resource object and resource object form and how can we use those fields while requesting for target resource.
    Regards,
    Alabhya Goel

    Thanks for your reply!!!!!!!!!!
    I know about resource object form i am just asking what is the use of user define field in resource object form. How can we use it. Like when we create any user defined field in under User form those fields display on create user form but when we create any user defined field in resource object from those are not displayed in form.
    If anyone has used or worked on user defined fields in Resource Object or resource object form; please give me an overview over the same.
    Regards
    Alabhya Goel

Maybe you are looking for

  • Error while  opening  a queryin BI 7?

    When I am opeing a query in BI 7 analyzer first I will be getting a warning message saying creating of TEXTELEMENT_24 failed and after that I will be getting error message A critical program error has occured. program will now terminate. Please refer

  • "insufficient RAM to fill" message when creating panoramas - 16 GB on my computer?[was: RAM]

    Why am I getting "insufficient RAM to fill" message when creating panoramas when I have 16 GB on my computer?

  • Mac OS X Finder cover flow mode, how to avoid unselecting following file after deleting

    Hi, I'm trying to organize thousands of pictures which involves deleting lots of consecutive files while I am viewing preceding and following picture. I found Finder is the most suitable tool. But one problem I face is that once I deleted a file usin

  • Output type missing

    Our output type ZPL0 to print Packing list has disappeared from the deliveries. We are unable to REPRINT packing list from SAP for a particular PLANT X200. What all do I need to check in the output determination to find the problem. Also there is no

  • Auto start listener & DB in Linux

    Hello, I have installed oracle 10g on Red Hat 2.1 Ent. Ed. I have also modified the /etc/oratab file for auto starting the service. The service start auto but i have two problems, 1) The listener does not start automatically 2) When trying to connect