SelectQuery and table that is synonym

From: laila paganelli (laila.paganell..mail.com)
Date: Wed Jul 06 2005 - 06:28:29 EDT

  • Next message: jira-norepl..bjectstyle.org: "[OS-JIRA] Created: (CAY-342) default value 'true' for using shared cache is not active"

    Hi,

    I'm trying to run a SelectQuery on a table that is a synonym of a remote table.
    I'm using oracle 10.1.0.4 and cayenne 1.2M4 jars.

    dataContext = DataContext.createDataContext(false);
    expression = Expression.fromString("name = 'english'");
    query = new SelectQuery(RawNewsLanguage.class, expression);
    result = (RawNewsLanguage)dataContext.performQuery(query).get(0);

    The cayenne query is SELECT t0.NAME, t0.ID_LNG FROM RAWNWSLNG t0 WHERE
    t0.NAME = ? [bind: 'english']

    If I run this query on a database with original RAWNWSLNG table, the
    result is correct

    {[ name => english
     ]<oid: com.extrapola.scooter.dataModel.RawNewsLanguage: <ID_LNG:
    20>; state: committed>}

    But if I run the query on a database with RAWNWSLNG like synonym, I
    have a strange result

    {[ name => ç
     ]<oid: com.extrapola.scooter.dataModel.RawNewsLanguage: <ID_LNG: 0>;
    state: committed>}

    Where is the problem?
    How I can run my application on tables that are synonyms?

    Thanks,
    Laila



    This archive was generated by hypermail 2.0.0 : Wed Jul 06 2005 - 06:28:32 EDT