Can JDO Query be extended

Hi,
Does KODO provide a hook to extend the javax.jdo.Query's implementation
class from KODO, they way it supports extending PersistenceManagerImpl?
Most of my objects need to be transferred over wire, and they should have
their identity accessible from the object itself when it goes in a
different jvm. If I can extend the Query's execute() methods to populate
their id in the object itself, that would look like a cleaner and
transparent solution.
Suggestions?
Regards,
Manoj

Manoj-
JDO does a lazy fetching of objects A, when B.getA() is called. I need to
have "id" member variable of A also populated before returning the
collection.Hmm ... do you mean that you just want to populate an "id"
field when you load an instance of A? If that is all you are trying to
do, then I would suggest having your class implement
javax.jdo.InstanceCallbacks and doing that work in jdoPostLoad().
In article <[email protected]>, Manoj Prakash wrote:
class A{
int id
// other primitive members
Class B{
int id
HashSet a // collection of A
public Collection getA(){
return a;
When I query objects of class B, I can use the FacadeQuery the way you
suggested, to populate "id" member variable of B.
JDO does a lazy fetching of objects A, when B.getA() is called. I need to
have "id" member variable of A also populated before returning the
collection.
I wanted to know what method(s) if overridden in PersistenceManagerImpl
would provide me hook to do that.
Regards,
Manoj
Marc Prud'hommeaux wrote:
Manoj-
I'm not sure what you mean. Can you post some pesudo-code of what you
are trying to accomplish?
In article <[email protected]>, Manoj Prakash wrote:
Great, thanks.
What methods if overridden from PersistenceManagerImpl can take care of
the case of populating Ids for the objects in a Collection, during lazy
fetching?
Marc Prud'hommeaux wrote:
Manoj-
You can't directly extend our Query implementation, but you could always
extend PersistenceManagerImpl and extend all the methods that return
queries to wrap them in a ManojQueryFacade class that just does what you
want in the execute method before delegating the call to the internally
held query. I think that should work OK (although I haven't actually
tried it).
In article <[email protected]>, Manoj Prakash wrote:
Hi,
Does KODO provide a hook to extend the javax.jdo.Query's implementation
class from KODO, they way it supports extending PersistenceManagerImpl?
Most of my objects need to be transferred over wire, and they should
have
their identity accessible from the object itself when it goes in a
different jvm. If I can extend the Query's execute() methods to populate
their id in the object itself, that would look like a cleaner and
transparent solution.
Suggestions?
Regards,
Manoj
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com

Similar Messages

  • Help with JDO query

    I'm currently using Kodo 3.0.2, MySQL 4.0.17 and MySQL driver 3.0.10
    I have written a JDO filter like this. Where all the criteria are
    properly grouped into parenthesis. However, the generated SQL statements
    removed/ignored the parenthesis. I may have made mistakes, please help.
    JDO FILTER
    ( m_Name.startsWith( name ) ) &&
    ( m_Parents.contains( parentFolder ) &&
    ( parentFolder.m_Owner.m_Account.m_ID==accountID &&
    parentFolder.m_IsCompanyWide == true ) ||
    ( parentFolder.m_Owner.m_ID==userID &&
    parentFolder.m_IsCompanyWide == false )
    ) ||
    ( m_Parents.contains( sharedFolder ) &&
    sharedFolder==sharedInfo.m_Entity &&
    ( sharedInfo.m_Accounts.contains( account ) &&
    account.m_ID==accountID ) ||
    ( sharedInfo.m_Users.contains( user ) && user.m_ID==userID )
    ) ||
    m_Owner.m_ID==userID && m_DeletedDate==null &&
    parentFolder.m_DeletedDate == null
    SQL
    SELECT DISTINCT t0.ID, t0.JDOCLASS, t0.JDOVERSION, t0.CREATIONDATE,
    t0.CUSTOMID, t0.DELETEDDATE, t0.LASTMODIFIEDDATE, t0.NAME, t0.OWNERID,
    t0.WL_INTERVAL, t12.SPECTROID, t0.WL_START, t0.TYPE, t0.WAVELENGTH FROM
    ABSTRACTENTITY t0 LEFT OUTER JOIN PARENTS_CHILDREN t1 ON t0.ID =
    t1.CHILDID LEFT OUTER JOIN ABSTRACTENTITY t2 ON t1.PARENTID = t2.ID LEFT
    OUTER JOIN USERS t3 ON t2.OWNERID = t3.ID LEFT OUTER JOIN ACCOUNTS t4 ON
    t3.ACCOUNTID = t4.ID LEFT OUTER JOIN PARENTS_CHILDREN t5 ON t0.ID =
    t5.CHILDID CROSS JOIN SHAREDINFOS t6 LEFT OUTER JOIN SI_ACCOUNTS t7 ON
    t6.ID = t7.SHAREDINFOID LEFT OUTER JOIN ACCOUNTS t8 ON t7.ACCOUNTID =
    t8.ID LEFT OUTER JOIN SI_USERS t9 ON t6.ID = t9.SHAREDINFOID LEFT OUTER
    JOIN USERS t10 ON t9.USERID = t10.ID LEFT OUTER JOIN USERS t11 ON
    t0.OWNERID = t11.ID INNER JOIN REFL_REFERENCES t12 ON t0.ID = t12.REFLID
    WHERE (t0.NAME LIKE ? AND (t4.ID = ? AND t2.COMPANYWIDE = ? OR t3.ID = ?
    AND t2.COMPANYWIDE = ? OR t5.PARENTID = t6.SHAREDENTTITYID AND (t8.ID =
    ? OR t10.ID = ?) OR t11.ID = ? AND t0.DELETEDDATE IS NULL AND
    t2.DELETEDDATE IS NULL)) AND t0.JDOCLASS = ? ORDER BY t0.CREATIONDATE
    DESC [params=(String) a%, (String) KL-DEV43513, (int) 1, (String)
    KL-DEV43514, (int) 0, (String) KL-DEV43513, (String) KL-DEV43514,
    (String) KL-DEV43514, (String)
    com.ewarna.pdm.entities.colorimetry.ReflectancePE] [reused=0]}
    [code=1053, state=S1000]

    Makas-
    In article <[email protected]>, Makas Tzavellas wrote:
    I dont actually get any results back as MySQL server takes up 99% CPU
    and never seems to stop (I restart MySQL after waiting for ~ 30 mins)
    when the SQL is executed.That's odd. If you manually execute the query, does MySQL still freeze?
    It could just be that it is a query that MySQL has a hard time with.
    Can you reduce the complexity of the query until you do get a subset (or
    superset) of your desired records, and from there try to isolate where
    exactly the problem is occuring?
    Since your object model and query need is a little complex, I don't
    have any suggestions off the top of my head of a way to re-cast the
    query in a simpler way.
    I'm not sure if my JDO query is correct, which I hope you can help me with.
    I have 5 classes Folder, Account, User and SharedInfo, Color.
    class Folder
    // The list of colours.
    private Collection m_Children;
    // The user that owns the folder.
    private User m_Owner;
    class Account
    private Collection m_Users;
    class User
    private Account m_Account;
    class SharedInfo
    // The list of accounts that the folder is shared to.
    private Collection m_Accounts;
    // The list of users that the folder is shared to (does not need to
    be from the same account as the list above).
    private Collection m_Users;
    // The folder that is shared.
    private Folder m_Entity;
    class Color
    // The folder(s) which this color is located.
    private Collection m_Parents;
    // The user that owns the color.
    private User m_Owner;
    Each folder can contain many colors and each color can be located in
    many folders. Folder and color has an owner (creator) associated to it.
    The color can have a different owner from the parent's owner (the person
    created the folder may not be the same person created the color).
    Folder can be "shared" to other accounts (accessible by all users from
    the account) or users (only accessible to the user). When a folder is
    shared, all colors within the folder is accessible to the person.
    What I want to express in the query is, to return ALL colors that are
    located in my "Company Wide" folder or "My Folder" or "SharedFolder"
    (Folders shared to me/account, which is defined in SharedInfo).
    So how should this be expressed as I'm having no luck with the one I
    came up with.
    Thanks.
    Marc Prud'hommeaux wrote:
    Makas-
    While the parenthesis in the SQL might be different than in your initial
    query, the result of the query should still be correct: the logic should
    be equivalent.
    Are you seeing different results than you expect to see, or were you
    just curious about the SQL?
    In article <[email protected]>, Makas Tzavellas wrote:
    I'm currently using Kodo 3.0.2, MySQL 4.0.17 and MySQL driver 3.0.10
    I have written a JDO filter like this. Where all the criteria are
    properly grouped into parenthesis. However, the generated SQL statements
    removed/ignored the parenthesis. I may have made mistakes, please help.
    JDO FILTER
    ( m_Name.startsWith( name ) ) &&
    ( m_Parents.contains( parentFolder ) &&
    ( parentFolder.m_Owner.m_Account.m_ID==accountID &&
    parentFolder.m_IsCompanyWide == true ) ||
    ( parentFolder.m_Owner.m_ID==userID &&
    parentFolder.m_IsCompanyWide == false )
    ) ||
    ( m_Parents.contains( sharedFolder ) &&
    sharedFolder==sharedInfo.m_Entity &&
    ( sharedInfo.m_Accounts.contains( account ) &&
    account.m_ID==accountID ) ||
    ( sharedInfo.m_Users.contains( user ) && user.m_ID==userID )
    ) ||
    m_Owner.m_ID==userID && m_DeletedDate==null &&
    parentFolder.m_DeletedDate == null
    SQL
    SELECT DISTINCT t0.ID, t0.JDOCLASS, t0.JDOVERSION, t0.CREATIONDATE,
    t0.CUSTOMID, t0.DELETEDDATE, t0.LASTMODIFIEDDATE, t0.NAME, t0.OWNERID,
    t0.WL_INTERVAL, t12.SPECTROID, t0.WL_START, t0.TYPE, t0.WAVELENGTH FROM
    ABSTRACTENTITY t0 LEFT OUTER JOIN PARENTS_CHILDREN t1 ON t0.ID =
    t1.CHILDID LEFT OUTER JOIN ABSTRACTENTITY t2 ON t1.PARENTID = t2.ID LEFT
    OUTER JOIN USERS t3 ON t2.OWNERID = t3.ID LEFT OUTER JOIN ACCOUNTS t4 ON
    t3.ACCOUNTID = t4.ID LEFT OUTER JOIN PARENTS_CHILDREN t5 ON t0.ID =
    t5.CHILDID CROSS JOIN SHAREDINFOS t6 LEFT OUTER JOIN SI_ACCOUNTS t7 ON
    t6.ID = t7.SHAREDINFOID LEFT OUTER JOIN ACCOUNTS t8 ON t7.ACCOUNTID =
    t8.ID LEFT OUTER JOIN SI_USERS t9 ON t6.ID = t9.SHAREDINFOID LEFT OUTER
    JOIN USERS t10 ON t9.USERID = t10.ID LEFT OUTER JOIN USERS t11 ON
    t0.OWNERID = t11.ID INNER JOIN REFL_REFERENCES t12 ON t0.ID = t12.REFLID
    WHERE (t0.NAME LIKE ? AND (t4.ID = ? AND t2.COMPANYWIDE = ? OR t3.ID = ?
    AND t2.COMPANYWIDE = ? OR t5.PARENTID = t6.SHAREDENTTITYID AND (t8.ID =
    ? OR t10.ID = ?) OR t11.ID = ? AND t0.DELETEDDATE IS NULL AND
    t2.DELETEDDATE IS NULL)) AND t0.JDOCLASS = ? ORDER BY t0.CREATIONDATE
    DESC [params=(String) a%, (String) KL-DEV43513, (int) 1, (String)
    KL-DEV43514, (int) 0, (String) KL-DEV43513, (String) KL-DEV43514,
    (String) KL-DEV43514, (String)
    com.ewarna.pdm.entities.colorimetry.ReflectancePE] [reused=0]}
    [code=1053, state=S1000]
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Bad SQL for JDO query

    Kodo JDO EE 2.3 RC1 (with InstantDB on JBoss 3.0 on JDK 1.3.1 on Mac
    OS X 10.1.5) generates wrong SQL for a JDO query with a parameter.
    Essentially (unimportant details omitted) I have the following:
    2 associated persistence-capable classes
    public class Person
         private String name;
    public class Issue
         private int id;
         private Person owner;
    both with application-managed identity (Person by name, Issue by id),
    both in the same package. I want to search the database for all Issues
    owned by a certain Person. My code looks like this:
    @pre p is persistent
    Collection findByOwner(Person p){
         // pm is the PersistenceManager
         //TODO pm.newQuery(Issue.class, filter) does not work with Kodo 2.3 RC1
         Extent extent = pm.getExtent(Issue.class, true);
         Query query = pm.newQuery(extent, "owner==person");
         query.setClass(Issue.class);
         query.setIgnoreCache(true);
         query.declareParameters(Person.class.getName() + " person");
         return (Collection)query.execute(p);
    and produces the following SQL statement
    SELECT t0.IDX, t0.JDOCLASSX, t0.JDOLOCKX, t0.NAME_OWNERX FROM ISSUEX
    t0, PERSONX t1 WHERE (t1.NAMEX = NULL AND t0.NAME_OWNERX = t1.NAMEX)
    which is wrong because the actual p.name, which is definitely not nil,
    got lost, and is even rejected by the database*, probably because
    NAMEX is the primary key and cannot be NULL.
    I am pretty sure that this used to work correctly with Kodo 2.2.4. Can
    anyone tell me what I could be doing wrong? I will provide the full
    source code at request.
    Thanks,
    Jakob
    * SQLException:
    Don't understand SQL after: "WHERE"
    Expected: "{" found: "NULL"

    This issue has been resolved in internal builds.
    Some tangential notes about the code below:
    - in our latest version, we no longer require extents when executing
    queries (the candidate class is sufficient).
    - I'm a little concerned about where the 'pm' variable came from in
    Issue.findByOwner(). If that's a member variable, you'd be better off
    doing 'JDOHelper.getPersistenceManager (this)' instead of caching it on
    your own -- this way, you'll avoid any potential issues with somehow
    using the wrong PM or something.
    - Given that all the info is stored in the database already, I'd suggest
    making the relation a bidirectional one, so that you can just traverse
    from Issue to Person without needing to do a query. This will be faster,
    as we will be able to leverage our PM and PMF caches rather than needing
    to execute a query against the data store.
    -Patrick
    Jakob Spies <[email protected]> wrote:
    Kodo JDO EE 2.3 RC1 (with InstantDB on JBoss 3.0 on JDK 1.3.1 on Mac
    OS X 10.1.5) generates wrong SQL for a JDO query with a parameter.
    Essentially (unimportant details omitted) I have the following:
    2 associated persistence-capable classes
    public class Person
    private String name;
    public class Issue
    private int id;
    private Person owner;
    both with application-managed identity (Person by name, Issue by id),
    both in the same package. I want to search the database for all Issues
    owned by a certain Person. My code looks like this:
    @pre p is persistent
    Collection findByOwner(Person p){
    // pm is the PersistenceManager
    //TODO pm.newQuery(Issue.class, filter) does not work with Kodo 2.3 RC1
    Extent extent = pm.getExtent(Issue.class, true);
    Query query = pm.newQuery(extent, "owner==person");
    query.setClass(Issue.class);
    query.setIgnoreCache(true);
    query.declareParameters(Person.class.getName() + " person");
    return (Collection)query.execute(p);
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Saving JDO Query?

    Hi,
    Can i save a JDO query (written using JDOQL) to a file or DB and later
    retrieve it back and execute the query ?Is this possible?
    In our application,we provide "search" function .The user can save a search
    query along with the criteria given.Later he can execute and use the
    results.
    -Srini

    While we don't provide direct support of it, you certainly should be able
    to with a simple facade/helper class that stores the class of the extenet
    being queried, the filter, imports, declarations, and potentially some stringized version of your
    parameters (such as turning PC -> oid for later reconstitution by
    pm.getObjectById (new FoodId (strOid), true) into whatever stream you
    would like.
    On Thu, 27 Feb 2003 15:04:10 +0530, Srini wrote:
    Hi,
    Can i save a JDO query (written using JDOQL) to a file or DB and later
    retrieve it back and execute the query ?Is this possible?
    In our application,we provide "search" function .The user can save a search
    query along with the criteria given.Later he can execute and use the
    results.
    -Srini--
    Stephen Kim
    [email protected]
    SolarMetric, Inc.
    http://www.solarmetric.com

  • Can not query PQH_BUDGET_DETAILS in SQL*Plus

    Hi!
    I can see the Positions in the Forms-Mask within EBS.
    I want to write a concurrent Programm which queries some data form the positions-table.
    If i klick on "Help > Diagnostics > Examine" and select "system.last_query" i can see, that the data comes from a view called: "PQH_POS_BUDGETS_V".
    But if i try to query this view in SQL*Plus, it is empty.
    So i had a look at how this view is build, and i found, that the base tables should be PQH_BUDGETS and PQH_BUDGET_DETAILS.
    How can i query the position_id in PQH_BUDGET_DETAILS in a concurrent program or an self-writen BI Publisher Report?
    If i try to query in SQL*Plus it's empty.
    Who can help me with this issue?
    Thank you for your help!
    Best regards,
    Thomas

    Hi!
    Thats great!
    Thank you very much!
    Best regards,
    Thomas

  • How can I query all the members of a group using querbuilder?  I cannot find any related properties

    How can I query all the members of a group using querbuilder?  I cannot find any related properties describing members under /home/groups/s/sample_group in jcr repository.

    Hi,
    FieldPoint Explorer is no longer used to configure FieldPoint systems. However, I do not think that the configuring your system in FieldPoint Explorer is causing the error.
    FieldPoint systems are now setup in Measurement and Automation Explorer (MAX).  Information on setting up FieldPoint systems in MAX can be found in the MAX help under: Installed Products>> FieldPoint. Also, I recommend upgrading to the latest FieldPoint driver and version of MAX.  The FieldPoint VI's will be slightly different when you upgrade, so there is a good chance that this will eliminate the error.
    Regards,
    Hal L.

  • How can I query data from XML file stored as a CLOB ?

    Hi folks,
    please see below sample of XML file, which is stored in "os_import_docs", column "document" as CLOB.
    I would like to query this XML file using some SQL select.
    How can I query data form below XML?
    <?xml version="1.0" encoding="UTF-8"?>
    <etd>
      <header>
        <AR>000000000</AR>
        <AW>0</AW>
        <CT>S</CT>
        <CU>H</CU>
        <CZ>SS48</CZ>
        <BU>4</BU>
        <CH>0032</CH>
        <CK>2012-11-01</CK>
        <CL>21:18</CL>
        <CW>225</CW>
        <CX>0</CX>
        <CF>SS-CZL18</CF>
        <DV>2</DV>
      </header>
      <account_group id="234">
        <account id="234">
          <invoice id="000742024">
            <da>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>A</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>88754515</BS>
              <AD>Mike Tyson</AD>
              <AC>Mike Tyson</AC>
              <AZ>CZ6521232465</AZ>
              <AE/>
              <CG>A</CG>
              <AL>A</AL>
              <BZ>.</BZ>
              <AH>Some street</AH>
              <AI/>
              <AF>Some city</AF>
              <AK>Kraj</AK>
              <AG>CZ</AG>
              <AJ>885 21</AJ>
              <CR>21-11-2012</CR>
              <AY>602718709</AY>
              <AV>800184965</AV>
              <AP/>
              <AO/>
              <AQ/>
              <AN/>
            </da>
            <da>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>A</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>88754515</BS>
              <AD>Mike Tyson</AD>
              <AC>Mike Tyson</AC>
              <AZ>CZ6521232465</AZ>
              <AE/>
              <CG>A</CG>
              <AL>L</AL>
              <BZ>Mike Tyson</BZ>
              <AH>Some street</AH>
              <AI/>
              <AF>Some city</AF>
              <AK>Kraj</AK>
              <AG>CZ</AG>
              <AJ>885 21</AJ>
              <CR>21-11-2012</CR>
              <AY/>
              <AV>800184965</AV>
              <AP/>
              <AO/>
              <AQ/>
              <AN/>
            </da>
            <detaildc CH="0032" AB="234" BS="11888954" BB="32" BA="CZ" AT="" CI="7077329000002340342" AU="" DU="1Z48395" CB="CZK">
              <dc>
                <AW>0</AW>
                <CT>D</CT>
                <CU>C</CU>
                <BY>31-10-2012</BY>
                <CA>25-10-2012</CA>
                <CV>8151</CV>
                <BT>12111</BT>
                <CJ>1</CJ>
                <AM>0</AM>
                <DR>PC</DR>
                <DS/>
                <DO>25-10-2012</DO>
                <DQ>18:42</DQ>
                <CE>1</CE>
                <BH>8151</BH>
                <CY>8151 SHELL MALKOVICE P</CY>
                <DP>049336</DP>
                <DT/>
                <BQ/>
                <BR>500000</BR>
                <CN>30</CN>
                <CM>030</CM>
                <BO>160,00</BO>
                <BF>38,900</BF>
                <BC>6224,00</BC>
                <BI>32,417</BI>
                <CD>B</CD>
                <BG>0,600</BG>
                <BK>31,817</BK>
                <BJ>0,000</BJ>
                <DI>8</DI>
                <BP>20,00%</BP>
                <CC>CZK</CC>
                <BM>5090,67</BM>
                <BN>1018,13</BN>
                <BL>6108,80</BL>
                <BD>5090,67</BD>
                <BE>1018,13</BE>
                <DW>6108,80</DW>
                <CO>Nafta</CO>
              </dc>
            </detaildc>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>1</DG>
              <CN>30</CN>
              <CM>030</CM>
              <DF>160,00</DF>
              <DH>litr</DH>
              <DJ>20,00%</DJ>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA>P</DA>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>2</DG>
              <CN/>
              <CM/>
              <DF>160,00</DF>
              <DH>litr</DH>
              <DJ/>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA/>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>19</DG>
              <CN/>
              <CM/>
              <DF/>
              <DH/>
              <DJ/>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA/>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>8</DG>
              <CN/>
              <CM/>
              <DF/>
              <DH/>
              <DJ/>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA/>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
          </invoice>
        </account>
      </account_group>
      <footer>
        <AR>999999999</AR>
        <AW>0</AW>
        <CT>S</CT>
        <CU>T</CU>
        <CZ>SS48</CZ>
        <BU>4</BU>
        <CH>0032</CH>
        <CK>2012-11-01</CK>
        <CL>23:04</CL>
        <CW>225</CW>
        <BX>1</BX>
        <CS>7</CS>
        <BW>0000000000000610880</BW>
      </footer>
    </etd>sample - not working:
        select  x.*
        from os_import_docs d
             ,XMLTABLE('/etd/header'
                        PASSING httpuritype(d.document).getXML()
                        COLUMNS
                           response_status varchar2(50) PATH 'AR'
                        )  x
       where d.object_id = 2587058
         and rownum = 1; 
    ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 6196, maximum: 4000)Many thanks,
    Tomas

    Hello,
    many thanks for the reply. Your examples are very usefull for me.
    To answer your questions.
    An XML structure:
    /etd
        /header - repeat in each row in output
        /account_group/account
            /invoice
                /da - repeat for each details under "selected "invoice
                /detaildc/dc - the lowest level 
                /detaildn/dn - the lowest level 
                /dt - repeat for each details under "selected "invoice
        /footer - repeat in each row in outputI would like to to have a 1 row for each "record" in /detaildc section and include related nodes at higher levels.
    Please see below XML file, which is simplified file of example in first post, but includes a complete xml structure which needs to be queried in db.
    <?xml version="1.0" encoding="UTF-8"?>
    <etd>
      <header>
        <AR>000000000</AR>
        <CK>2012-10-31</CK>
        <CF>SS-CZL19</CF>
      </header>
      <account_group id="234">
        <account id="234">
          <invoice id="EI08P4000">
            <da>
              <AR>EI08P4000</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildc DU="1Z56655" CB="EUR">
              <dc>
                <DO>16-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>1940,60</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="2Z55050" CB="EUR">
              <dc>
                <DO>17-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>1328,10</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="2Z90001" CB="EUR">
              <dc>
                <DO>27-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>185,10</BM>
                <CO>Poplatek</CO>
              </dc>
            </detaildc>
            <dt>
              <AR>EI08P4000</AR>
              <DG>8</DG>
            </dt>
          </invoice>
        </account>
        <account id="234">
          <invoice id="EI13T7777">
            <da>
              <AR>EI13T7777</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildc DU="1Z48302" CB="EUR">
              <dc>
                <DO>26-10-2012</DO>
                <CY>SANEF 07706 A 07704</CY>
                <BM>232,10</BM>
                <CO>Dalnicni poplatek</CO>
              </dc>
            </detaildc> 
            <detaildc DU="1Z48302" CB="EUR">
              <dc>
                <DO>20-10-2012</DO>
                <CY>TEST A 07704</CY>
                <BM>30,10</BM>
                <CO>Poplatek</CO>
              </dc>
            </detaildc>       
            <dt>
              <AR>EI13T7777</AR>
              <DG>8</DG>         
            </dt>
          </invoice>
        </account>
        <account id="234">
          <invoice id="EI327744">
            <da>
              <AR>EI327744</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildn  CI="707732 00000234" >
              <dn>
                <BY>30-10-2012</BY>
                <BM>8,10</BM>
              </dn>
            </detaildn>
            <detaildn CI="707732 00000234" >
              <dn>
                <BY>30-10-2012</BY>
                <BM>399,50</BM>
              </dn>
            </detaildn>
            <dt>
              <AR>EI327744</AR>
            </dt>
          </invoice>
        </account>
        <account id="234">
          <invoice id="EI349515">
            <da>
              <AR>EI349515</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildc DU="1Z56514" CB="EUR">
              <dc>
                <DO>29-10-2012</DO>
                <CY>ALLAMI AUTOPALYAKEZE</CY>
                <BM>1240,60</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="1Z56515" CB="EUR">
              <dc>
                <DO>19-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>7428,10</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="1Z56515" CB="EUR">
              <dc>
                <DO>12-10-2012</DO>
                <CY>UK</CY>
                <BM>954,10</BM>
                <CO>Poplatek</CO>
              </dc>
            </detaildc>
            <dt>
              <AR>EI349515</AR>
              <DG>8</DG>
            </dt>
          </invoice>
        </account>
      </account_group>
      <footer>
        <CZ>SS47</CZ>
        <BU>4</BU>
        <CH>0032</CH>
        <CK>2012-10-31</CK>
        <CL>01:25</CL>
      </footer>
    </etd>Expected output
    AR     CK     CF             AR4             AD             DU     CB     DO             CY                     BM      CO                AR5             DG     CI             BY               BM6     CZ     BU       CH       CK7    CL
    0     41213     SS-CZL19     EI08P4000     Mickey Mouse     1Z56655     EUR     16-10-2012     ASFINAG POST_MAUT     1940,60     Dalnicni znamka        EI08P4000     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI08P4000     Mickey Mouse     2Z55050     EUR     17-10-2012     ASFINAG POST_MAUT     1328,10     Dalnicni znamka        EI08P4000     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI08P4000     Mickey Mouse     2Z90001     EUR     27-10-2012     ASFINAG POST_MAUT      185,10     Poplatek        EI08P4000     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI13T7777     Mickey Mouse     1Z48302     EUR     26-10-2012     SANEF 07706 A 07704      232,10     Dalnicni poplatek  EI13T7777     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI13T7777     Mickey Mouse     1Z48302     EUR     20-10-2012     TEST A 07704               30,10     Poplatek        EI13T7777     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI327744     Mickey Mouse                                                                      EI327744          707732 00000234     30-10-2012     8,10     SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI327744     Mickey Mouse                                                                      EI327744          707732 00000234     30-10-2012     399,50     SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI349515     Mickey Mouse     1Z56514     EUR     29-10-2012     ALLAMI AUTOPALYAKEZE     1240,60     Dalnicni znamka        EI349515     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI349515     Mickey Mouse     1Z56515     EUR     19-10-2012     ASFINAG POST_MAUT     7428,10     Dalnicni znamka        EI349515     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI349515     Mickey Mouse     1Z56515     EUR     12-10-2012     UK                      954,10     Poplatek        EI349515     8                                    SS47     4     32     41213     01:25

  • Living in apartment, here it has only wireless (no wired cable in the room). I've  an airport express (new ) so how can I do for extending signal (wireless) for using in myroom

    Living in an apartment, here it has only wireless (no wired cable in the room) signal using for the internet connection. I've  an airport express (new) ,so how can I do for extending signal (wireless) for using in myroom. because the wireless signal is so weak.

    Unfortunately, you won't be able to. In order to do so, you would have to configure both the AirPort Express and the other wireless router for a WDS. Since it will unlikely that the other router is another AirPort, nor will you have the ability to administer it, you won't be able to get this accomplished.

  • How do I get my iMac not to go to sleep so quickly. Can that time be extended?

    HOw do I get my iMac not to go to sleep so quickly?  Can that time be extended?

    you can also download an app called Caffeine. http://itunes.apple.com/us/app/caffeine/id411246225?mt=12

  • I can not reinstall Photoshop Extended CS6

    recently i reinstalled win7 in my computer. after that, i can not reinstall phototshop extended cs6.

    clean your system following these steps, http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html
    download the installation file here, http://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html

  • Query.setRange() not available on standard javax.jdo.Query interface?

    Hi Kodo people, I'm trying out Kodo 3.2.0, most specifically for the
    spiffy new setRange() functionality. However, I'm somewhat confused
    because while the docs clearly indicate that the setRange() method is
    available on the standard javax.jdo.Query interface, it's not available
    on the javax.jdo.Query class that ships with Kodo 3.2.0. I have to cast
    my query to a KodoQuery in order for this to work. Is this expected?
    Thanks,
    -Mike
    Michael Allen
    Technical Lead
    PGP Corporation

    I think you missed the note at the beginning of the query chapter in the docs:
    Much of the functionality we discuss in this chapter is new to JDO 2. Though
    Kodo supports all of the features defined in the following sections, many JDO
    implementations may not. Additionally, because official JDO 2 jars are not yet
    available, you will have to cast your query objects to kodo.query.KodoQuery to
    access any JDO 2 APIs. The UML diagram above depicts these APIs in bold. For
    simplicity, casts have been left out of the example code throughout the chapter.

  • How can this query avoid full table scans?

    It is difficult to avoid full table scans in the following query because the values of column STATUS reiterant numbers. There are only 10 numbers values for the STATUS column (1..10)
    But the table is very large. there are more than 1 million rows in it. A full table scanning consumes too much time.
    How can this query avoid full table scans?
    Thank you
    SELECT SYNC,CUS_ID INTO V_SYNC,V_CUS_ID FROM CONSUMER_MSG_IDX
                      WHERE CUS_ID = V_TYPE_CUS_HEADER.CUS_ID AND
                            ADDRESS_ID = V_TYPE_CUS_HEADER.ADDRESS_ID AND
                            STATUS =! 8;Edited by: junez on Jul 23, 2009 7:30 PM

    Your code had an extra AND. I also replaced the "not equal" operator, which has display problems with the forum software
    SELECT SYNC,CUS_ID
       INTO V_SYNC,V_CUS_ID
      FROM CONSUMER_MSG_IDX
    WHERE CUS_ID = V_TYPE_CUS_HEADER.CUS_ID AND
           ADDRESS_ID = V_TYPE_CUS_HEADER.ADDRESS_ID AND
           STATUS != 8;Are you sure this query is doing a table scan? Is there an index on CUS_ID, ADDRESS_ID? I would think that would be mostly unique. So I'm not sure why you think the STATUS column is causing problems. It would seem to just be a non-selective additional filter.
    Justin

  • JDO Query does not seem to be executed at all

    I have the following JDO query and it returns empty collection but it
    should return some records. I set "SQL=TRACE" in kodo.properties file and
    traced the log file. This query does not seem to generate SQL statement
    at all. Other JDO method generates SQL statements.
    Kodo version: 3.1.2
    J2SE: 1.4.1_05
    Database: MS SQL Server 2000
    // Get endorsement rule type
    String ruleType = getEndorsementRuleType();
    Query qry = pm.newQuery(EndorsementRule.class);
    try {
    qry.declareParameters("String ruleType");
    qry.setFilter("this.ruleType == ruleType");
    log.info("*** EXECUTE RULE QUERY ***");
    Collection c = (Collection)qry.execute(ruleType);
    log.info("*** qrysize=" + c.size());
    finally {
    qry.closeAll();
    Log file: There is not SQL statement generated for the JDO query.
    [junit] INFO: Get endorsement rule type
    [junit] Jun 7, 2004 12:39:01 PM EndorsementRuleEngine
    getEndorsementRuleType
    [junit] INFO: *** JDO EXECUTE BEGIN ***
    [junit] 16366 TRACE [main] kodo.jdbc.SQL - <t 3969559, conn 18096534> [0
    m
    s] executing prepstmnt 20731151 SELECT t0.EndtType, t0.EndtId FROM EndtHe
    aderItem t0 WHERE t0.EndtId = ? [params=(int) 6137330] [reused=0]
    [junit] Jun 7, 2004 12:39:01 PM EndorsementRuleEngine
    getEndorsementRuleType
    [junit] INFO: *** JDO EXECUTE END ***
    [junit] Jun 7, 2004 12:39:02 PM EndorsementRuleEngine getRules
    [junit] INFO: *** EXECUTE RULE QUERY ***
    +++ WHERE IS SQL statement for JDO Query ? +++
    [junit] Jun 7, 2004 12:39:02 PM EndorsementRuleEngine getRules
    [junit] INFO: *** qrysize=0
    [junit] Jun 7, 2004 12:39:02 PM mytest.EndtRuleTestCase setComplete
    Thanks,
    Andy

    Please ignore this post. The error was caused by the file merge done by
    StarTeam.

  • How can I download the extended Middle Eastern version of inDesign, called "Tasmeem"?

    Hello everyone,
    I would love it if someone tells me how can I download the extended ME version of inDesign, it is called "Tasmeem" and it is made for Arabic Calligraphy.
    thank you,
    Rayan.

    Peter, Tasmeem is not just the regular ME edition of InDesign. I think
    it is an InDesign extension published by Winsoft, the French company who
    originally developed the Middle Eastern version of InDesign before Adobe
    took it over.
    So the OP should probably check out the Winsoft website to see if it's
    still available, and for which versions of InDesign.

  • Can we query a stored procedure results as an SQL Table ?

    Hi,
    Can we query a results from the results of a stored procedure returning a result set either as cursors or as PL/SQL Table like what we do like this
    select * from <tablename>
    select * from (select * from tablename) alias. instead of this, can we do like this
    select * from (results of stored procedure) alias.
    Please Provide any Help.

    I agree. Pipelined Table Functions are the way to go.
    Docs at http://tahiti.oracle.com
    Working demos in Morgan's Library at www.psoug.org under Pipelined Table Functions.

Maybe you are looking for

  • Text in tables in Pages

    I am using the table function in Pages to create an alphabeticized glossary. All good. Except, in one series ("D" words), every time I try to add a new row and write in the new word, it defaults to the same 2 letters "dé". I cannot add the new word.

  • Issue in ADF security

    Hi All, Jdev version: 11.1.1.3.0 I have configured form based ADF security for my ADF application. Also I have created Application roles and associated roles also. In ADF application i have Home.jspx. Once i run the Home.jspx it should open a login.h

  • Printer port #???

    I have a wireless laptop and I am not able to print from it. After 4-5 hours online with microsoft , we found that when mcafee was disabled i was able to print from my wireless laptop. So, they advised me to contact mcafee to "reconfigure"  to allow

  • Photobooth didn't come with my Mac, is there any way I can download it?

    I just noticed that my Macbook didn't have Photo booth built in... I tried to download it but there's no option and it says my photo booth is outdates (2.3 version or something), and it doesn't have an option to update it. Is there any way I can re d

  • Why does my N73 cause PC Suite to Crash

    Installed latest firmware upgrade for N73 (forget number - but it is the latest via Nokia Software Updater for my Orange UK phone, and probably for any). Phone works fine. Installed latest PC Suite (6.85.12.0) When phone is connected by USB or by Blu