Re: Query Error in table with auto_pk_generation

From: Steve Wells (stwell..wnmail.net)
Date: Wed Aug 04 2004 - 23:42:46 EDT

  • Next message: Orion Fields: "Testing for Valid Objects"

    Reinaldo,

    It might help if you could post some code. Also do you get any
    validation errors when you save in the modeller?

    ----- Original message -----
    From: "Reinaldo Coelho Sartorelli" <reinaldo_sartorell..ahoo.com.br>
    To: cayenne-use..bjectstyle.org
    Date: Thu, 5 Aug 2004 00:25:05 -0300
    Subject: Query Error in table with auto_pk_generation

    Hi all, have a time, i send the down error to list.

    This error occur when i execute the INSERT in table whith the AUTO PK
    GENERATION, and after i search a data.

    org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1M7_1 June 15
    2004]
    Error creating object for entity 'Linguas'.
            at
    org.objectstyle.cayenne.access.DataContext.registeredObject(DataContext.java:436)
            at
    org.objectstyle.cayenne.access.DataContext.objectsFromDataRows(DataContext.java:658)
            at
    org.objectstyle.cayenne.access.util.SelectObserver$PrefetchTreeNode.resolveObjectTree(SelectObserver.java:377)
            at
    org.objectstyle.cayenne.access.util.SelectObserver.getResultsAsObjects(SelectObserver.java:193)
            at
    org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1501)
            at
    org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1404)
            at br.com.leiarock.mapeamento.Linguas.buscarLingua(Linguas.java:91)
            at testes.main(testes.java:38)
    Caused by: java.lang.InstantiationException:
    br.com.leiarock.mapeamento.Linguas
            at java.lang.Class.newInstance0(Class.java:293)
            at java.lang.Class.newInstance(Class.java:261)
            at
    org.objectstyle.cayenne.access.DataContext.newDataObject(DataContext.java:201)
            at
    org.objectstyle.cayenne.access.DataContext.registeredObject(DataContext.java:427)
            ... 7 more
    null

    Tks,
    Reinaldo.



    This archive was generated by hypermail 2.0.0 : Wed Aug 04 2004 - 23:42:49 EDT