Vertical Mapping in 3.0.1

I'm trying to do a vertical mapping and am getting the following exception:
java.lang.ClassCastException
at kodo.jdbc.meta.ClassMapping.resolve(ClassMapping.java:952)
at
kodo.jdbc.meta.VerticalClassMapping.resolve(VerticalClassMapping.java:300)
at kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:381)
at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:298)
at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:162)
at kodo.jdbc.meta.MappingRepository.getMetaData(MappingRepository.java:150)
My jdo file has:
<class name="ContactInfo" objectid-class="ContactInfoId">
<extension vendor-name="kodo" key="jdbc-class-map" value="base">
<extension vendor-name="kodo" key="table"
value="t_contactinfo"/>
<extension vendor-name="kodo" key="pk-column" value="id_i"/>
</extension>
<extension vendor-name="kodo" key="jdbc-class-ind"
value="in-class-name">
<extension vendor-name="kodo" key="column"
value="classtype_id_vc"/>
</extension>
<extension vendor-name="kodo" key="jdbc-version-ind"
value="version-number">
<extension vendor-name="kodo" key="column"
value="rowversion_i"/>
</extension>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="jdbc-field-map"
value="value">
<extension vendor-name="kodo" key="column"
value="id_i"/>
</extension>
</field>
<field name="primary">
<extension vendor-name="kodo" key="jdbc-field-map"
value="value">
<extension vendor-name="kodo" key="column"
value="primary_b"/>
</extension>
</field>
<field name="person">
<extension vendor-name="kodo" key="jdbc-field-map"
value="one-one">
<extension vendor-name="kodo" key="column.id_i"
value="person_id_i"/>
</extension>
</field>
</class>
<class name="AddressContactInfo"
persistence-capable-superclass="ContactInfo" identity-type="application">
<extension vendor-name="kodo" key="jdbc-class-map"
value="vertical">
<extension vendor-name="kodo" key="table"
value="t_addresscontactinfo"/>
<extension vendor-name="kodo" key="ref-column.id_i"
value="contactinfo_id_i"/>
</extension>
<field name="address1">
<extension vendor-name="kodo" key="jdbc-field-map"
value="value">
<extension vendor-name="kodo" key="column"
value="address1_vc"/>
</extension>
</field>
<field name="address2">
<extension vendor-name="kodo" key="jdbc-field-map"
value="value">
<extension vendor-name="kodo" key="column"
value="address2_vc"/>
</extension>
</field>
<field name="city">
<extension vendor-name="kodo" key="jdbc-field-map"
value="value">
<extension vendor-name="kodo" key="column"
value="address2_vc"/>
</extension>
</field>
<field name="state">
<extension vendor-name="kodo" key="jdbc-field-map"
value="one-one">
<extension vendor-name="kodo" key="column.id_vc"
value="state_id_vc"/>
</extension>
</field>
<field name="zip">
<extension vendor-name="kodo" key="jdbc-field-map"
value="value">
<extension vendor-name="kodo" key="column"
value="zip_vc"/>
</extension>
</field>
</class>
and my database create statements are:
create table t_contactinfo (
id_i int not null primary key,
person_id_i not null CONSTRAINT fk_contactinfo_person REFERENCES
t_person(id_i),
primary_b number(1) not null,
rowversion_i int not null,
classtype_id_vc varchar(255) CONSTRAINT fk_contactinfo_classtype_id
REFERENCES t_classtype(id_vc) not null
create table t_addresscontactinfo (
contactinfo_id_i not null CONSTRAINT fk_adress_contactinfo references
t_contactinfo(id_i),
address1_vc varchar(255),
address2_vc varchar(255),
city_vc varchar(255),
state_id_vc CONSTRAINT fk_address_state references t_state(id_vc),
zip_vc varchar(255),
rowversion_i int not null,
primary key(contactinfo_id_i)
Any idea what the problem is?
Thanks,
Nathan

Ted-
Did this work in 3.0.0?I believe not.
If so, I cannot move until 3.0.2 is released.3.0.2 will be release very soon.
In article <bu9i1l$gt9$[email protected]>, Ted Poovey wrote:
Did this work in 3.0.0? If so, I cannot move until 3.0.2 is released.
Abe White wrote:
You have found a bug. It affects subclasses that map two or more simple
value fields to the same column, so the only current workaround for you
would be to get rid of one of the fields mapped to the address2_vc
column for now.
I've already fixed the bug internally; the fix will be available in 3.0.2.
Thanks for the report.
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com

Similar Messages

  • Query: Missing tablename in generated SQL for vertical mapped classes

    Hi,
    I am playing with Kodo 3.1.4 / Postgres 7.4 and could not find any
    solution for this problem:
    I have one class calles "Clipfragment" which represents video clips and
    has a long - field named "lengthInMinutes". It extends a baseclass
    called "Categorizablefragment", which has a field "id" and some others.
    I use vertical mapping, thus having one table per class. The identity
    type is 'application'. The table for the class "Categorizablefragment"
    contains fields for jdoclass and jdoversion and IMHO correct entries.
    Everything works really fine except for Querys against subclass fields
    with aggregate functions. E.g. counting all clips works:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("count(id)");
    Number count = (Number) q.execute ();
    But: Querying for the sum of the field 'lengthInMinutes' fails:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("sum(lengthInMinutes)");
    Number count = (Number) q.execute ();
    The exception is:
    kodo.util.UserException: com.solarmetric.jdbc.ReportingSQLException:
    ERROR: syntax error at or near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: ERROR: syntax error at or
    near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:865)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:728)
    atde.jk.buvas.model.impl.DefaultClipManager.getTotalTime(DefaultClipManager.java:43)
    And the SQL - Trace:
    5766 TRACE [main] kodo.jdbc.SQL - <t 17089909, conn 31908613 (1
    errors)> [0 ms] executing prepstmnt 17226426 SELECT
    SUM(t0.lengthinminutes) FROM WHERE t1.jdoclass = ? [params=(String)
    de.jk.buvas.model.fragments.ClipFragment] [reused=0]
    I tried both 'base-tables' and 'per-subclass' for the property
    kodo.jdbc.VerticalQueryMode, without any results.
    Any ideas?
    Thanks,
    Jochen

    Hi Stephen,
    here are the excerpts from the .jdo and the .mapping files. The .jdo
    file was generated by XDoclet.
    ..jdo
    <class name="ClipFragment"
    identity-type="application"
    objectid-class="CategorizableFragment$Id"
    persistence-capable-superclass="CategorizableFragment"
    > <!-- end class tag -->
    <extension vendor-name="kodo"
    key="jdbc-class-map-name"
    value="vertical">
    <extension vendor-name="kodo" key="table" value="Clip"/>
    </extension>
    <field name="title"
    > <!-- end field tag -->
    <extension vendor-name="kodo"
    key="jdbc-size"
    value="100">
    </extension>
    </field>
    <field name="lengthInMinutes"
    > <!-- end field tag -->
    </field>
    <field name="description"
    > <!-- end field tag -->
    <extension vendor-name="kodo"
    key="jdbc-size"
    value="3000">
    </extension>
    </field>
    <field name="recordingDate"
    > <!-- end field tag -->
    </field>
    <field name="actors"
    > <!-- end field tag -->
    <collection
    element-type="de.jk.buvas.model.fragments.ActorFragment"
    > <!-- end collection tag -->
    </collection>
    <extension vendor-name="kodo"
    key="jdbc-element-delete-action"
    value="exception-deferred">
    </extension>
    <extension vendor-name="kodo"
    key="inverse-owner"
    value="clips">
    </extension>
    </field>
    <field name="media"
    > <!-- end field tag -->
    <collection
    element-type="de.jk.buvas.model.fragments.MediumFragment"
    > <!-- end collection tag -->
    </collection>
    <extension vendor-name="kodo"
    key="jdbc-element-delete-action"
    value="exception-deferred">
    </extension>
    </field>
    </class>
    <class name="CategorizableFragment"
    identity-type="application"
    objectid-class="CategorizableFragment$Id"
    > <!-- end class tag -->
    <extension vendor-name="kodo"
    key="jdbc-class-map-name"
    value="base">
    <extension vendor-name="kodo" key="table" value="Categorizable"/>
    </extension>
    <field name="id"
    primary-key="true"
    > <!-- end field tag -->
    </field>
    <field name="category"
    > <!-- end field tag -->
    <extension vendor-name="kodo"
    key="jdbc-delete-action"
    value="exception-deferred">
    </extension>
    </field>
    </class>
    ..mapping
    <class name="ClipFragment">
    <jdbc-class-map type="vertical" ref-column.ID="ID" table="CLIPFRAGMENT"/>
    <field name="actors">
    <jdbc-field-map type="many-many" element-column.ID="ID"
    ref-column.ID="CLIPS_ID" table="ACTOR_CLIPS"/>
    </field>
    <field name="description">
    <jdbc-field-map type="value" column="DESCRIPTION"/>
    </field>
    <field name="lengthInMinutes">
    <jdbc-field-map type="value" column="LENGTHINMINUTES"/>
    </field>
    <field name="media">
    <jdbc-field-map type="many-many" element-column.ID="MEDIA_ID"
    order-column="MEDIA_ORDER" ref-column.ID="ID" table="CLIPF_MEDIA"/>
    </field>
    <field name="recordingDate">
    <jdbc-field-map type="value" column="RECORDINGDATE"/>
    </field>
    <field name="title">
    <jdbc-field-map type="value" column="TITLE"/>
    </field>
    </class>
    <class name="CategorizableFragment">
    <jdbc-class-map type="base" table="CATEGORIZABLEFRAGMENT"/>
    <jdbc-version-ind type="version-number" column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="category">
    <jdbc-field-map type="one-one" column.ID="CATEGORY_ID"/>
    </field>
    <field name="id">
    <jdbc-field-map type="value" column="ID"/>
    </field>
    </class>
    Thanks,
    Jochen
    Stephen Kim wrote:
    Can you post the mapping/metadata files for the two classes?
    Jochen Kressin wrote:
    Hi,
    I am playing with Kodo 3.1.4 / Postgres 7.4 and could not find any
    solution for this problem:
    I have one class calles "Clipfragment" which represents video clips
    and has a long - field named "lengthInMinutes". It extends a baseclass
    called "Categorizablefragment", which has a field "id" and some
    others. I use vertical mapping, thus having one table per class. The
    identity type is 'application'. The table for the class
    "Categorizablefragment" contains fields for jdoclass and jdoversion
    and IMHO correct entries.
    Everything works really fine except for Querys against subclass fields
    with aggregate functions. E.g. counting all clips works:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("count(id)");
    Number count = (Number) q.execute ();
    But: Querying for the sum of the field 'lengthInMinutes' fails:
    KodoQuery q = (KodoQuery) getJdoPm().newQuery(ClipFragment.class);
    q.setResult ("sum(lengthInMinutes)");
    Number count = (Number) q.execute ();
    The exception is:
    kodo.util.UserException: com.solarmetric.jdbc.ReportingSQLException:
    ERROR: syntax error at or near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: ERROR: syntax error at or
    near "WHERE"
    {prepstmnt 16398807 SELECT AVG(t0.lengthinminutes) FROM  WHERE
    t1.jdoclass = ? [reused=0]} [code=0, state=42601]
    at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:865)
    at kodo.query.AbstractQuery.execute(AbstractQuery.java:728)
    atde.jk.buvas.model.impl.DefaultClipManager.getTotalTime(DefaultClipManager.java:43)
    And the SQL - Trace:
    5766 TRACE [main] kodo.jdbc.SQL - <t 17089909, conn 31908613 (1
    errors)> [0 ms] executing prepstmnt 17226426 SELECT
    SUM(t0.lengthinminutes) FROM WHERE t1.jdoclass = ? [params=(String)
    de.jk.buvas.model.fragments.ClipFragment] [reused=0]
    I tried both 'base-tables' and 'per-subclass' for the property
    kodo.jdbc.VerticalQueryMode, without any results.
    Any ideas?
    Thanks,
    Jochen

  • Where: vertical-mapping  JDO meta-data examples

    Looking for package.jdo examples that describe a vertical mapping
    scenario

    In article <bu9h3e$g3h$[email protected]>, Kevin J Citron wrote:
    >
    Looking for package.jdo examples that describe a vertical mapping
    scenariohttp://docs.solarmetric.com/manual.html#vertical
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Problem with vertical mapping

    I start with:
    <?xml version="1.0"?>
    <!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects
    Metadata 1.0//EN" "http://java.sun.com/dtd/jdo_1_0.dtd">
    <jdo>
    <package name="com.amkor.request.sma">
    <class name="JBaseDTO">
    <extension vendor-name="kodo" key="jdbc-sequence-factory"
    value="JDOKeySequenceGeneratorFactory" />
    </class>
    <class name="A_DTO" persistence-capable-superclass="JBaseDTO">
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="vertical">
         <extension vendor-name="kodo" key="table" value="REQUESTS"/>
         <extension vendor-name="kodo" key="ref-column.JDOID"
    value="PARENT_ID"/>
         </extension>
    </class>
    </package>
    </jdo>
    The mapping that is generated is via the mapping tool is:
    <?xml version="1.0" encoding="UTF-8"?>
    <mapping>
    <package name="com.amkor.request.sma">
    <class name="JBaseDTO">
    <jdbc-class-map type="base" pk-column="JDOID"
    table="ESUSER.JBASEDTO"/>
    <jdbc-version-ind type="version-number" column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="id">
    <jdbc-field-map type="value" column="ID"/>
    </field>
    </class>
    <class name="A_DTO">
    <jdbc-class-map type="flat"/>
    <field name="name">
    <jdbc-field-map type="value" column="NAME"/>
    </field>
    </package>
    </mapping>
    The relavant parts are
    (JDO Meta-Data) <extension vendor-name="kodo" key="jdbc-class-map"
    value="vertical">
    (Mapping file) <jdbc-class-map type="flat"/>
    What am I doing wrong ??

    Marc Prud'hommeaux wrote:
    Marc- Im using the mapping tool to generate the mappings.
    From the JDO specified above. Which was taken from the vertical
    mapping example in your documentation.
    But why are you defining your O/R extensions in the .jdo file and
    then generating a .mapping file? Why don't you just use the "metadata"
    MappingFactory, and use that directly?Marc, I'm just going off of the examples that you have included in your
    documentation. Is this not the most accurate way to achieve the results
    I seek ?? I mean, unless I'm missing something. This IS YOUR
    documentation.
    Is it not. If there is a better way. Please point me to the appropriate
    docs.
    BTW. I work for a company
    that has a licensed product. Who do I need to contact about this
    issue.
    If you have a support and maintenance contract, you can contact support
    channels at: [email protected]
    If you have any questions about your maintenance and support status,
    contact: [email protected]
    In article <[email protected]>, Kevin J Citron wrote:
    Marc Prud'hommeaux wrote:
    Kevin-
    How are you "generating the mapping"? If you want to define your
    mappings in the .jdo file, why not just use the "metadata"
    MappingFactory?
    In article <[email protected]>, Kevin J Citron wrote:
    I start with:
    <?xml version="1.0"?>
    <!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects
    Metadata 1.0//EN" "http://java.sun.com/dtd/jdo_1_0.dtd">
    <jdo>
    <package name="com.amkor.request.sma">
    <class name="JBaseDTO">
    <extension vendor-name="kodo" key="jdbc-sequence-factory"
    value="JDOKeySequenceGeneratorFactory" />
    </class>
    <class name="A_DTO" persistence-capable-superclass="JBaseDTO">
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="vertical">
         <extension vendor-name="kodo" key="table" value="REQUESTS"/>
         <extension vendor-name="kodo" key="ref-column.JDOID"
    value="PARENT_ID"/>
         </extension>
    </class>
    </package>
    </jdo>
    The mapping that is generated is via the mapping tool is:
    <?xml version="1.0" encoding="UTF-8"?>
    <mapping>
    <package name="com.amkor.request.sma">
    <class name="JBaseDTO">
    <jdbc-class-map type="base" pk-column="JDOID"
    table="ESUSER.JBASEDTO"/>
    <jdbc-version-ind type="version-number"
    column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="id">
    <jdbc-field-map type="value" column="ID"/>
    </field>
    </class>
    <class name="A_DTO">
    <jdbc-class-map type="flat"/>
    <field name="name">
    <jdbc-field-map type="value" column="NAME"/>
    </field>
    </package>
    </mapping>
    The relavant parts are
    (JDO Meta-Data) <extension vendor-name="kodo" key="jdbc-class-map"
    value="vertical">
    (Mapping file) <jdbc-class-map type="flat"/>
    What am I doing wrong ??
    Marc- Im using the mapping tool to generate the mappings.
    From the JDO specified above. Which was taken from the vertical
    mapping example in your documentation. BTW. I work for a company
    that has a licensed product. Who do I need to contact about this
    issue.
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Vertical Inheritance with Application ID Hierarchy

    Hello,
    I want to implement Vertical Inheritance with Application ID Hierarchy,
    using a HyperSonic-Database. The essential code is appended.
    The following test-application leads to an exception. Things work fine,
    if I use one ID-class for all persistent classes; a similar attempt with
    horizontal inheritance did work, too.
    String attr1Val = getUniqueString();
    String attr2Val = getUniqueString();
    // ... get PersistenceManager, etc.
    // Write something into DB
    pm.currentTransaction().begin();
    Parent p = new Parent();
    p.setattr1("attr1Value");
    Child c = new Child();
    c.setattr1("qwerty");
    c.setattr2(attr2Val);
    pm.makePersistent(c);
    pm.currentTransaction().commit();
    // Query
    Query query = pm.newQuery(Child.class,"attr2 == param");
    query.declareParameters("String param");
    Collection results = (Collection)query.execute(attr2Val);
    kodo.util.FatalUserException: Duplicate object ids have been assigned to
    two different objects: the identity "1" of class "class foo.Child$ID" was
    assigned to both "foo.Child@1f4cbee" and "foo.Child@787d6a". This can
    occur when a horizontally or vertically mapped class uses application
    identity with an auto-increment field and does not use a hierarchy of
    application identity classes.[foo.Child$ID-1]
    Can anyone help ?
    Thanks.
    Lutz
    code-pieces:
    parent.java:
    public class Parent implements Serializable,InstanceCallbacks
    private transient PersistenceManager pm = null;
    public Long ObjId;
    public void setObjId(Long value)
    ObjId = value;
    // application identity class for Manager; represented as
    // a static inner class for the persistable class
    public static class ID implements Serializable
    static
    { // register persistent class in JVM
    Class c = foo.Parent.class;
    public Long ObjId;
    public ID ()
    public ID (String str)
    fromString (str);
    public String toString ()
    return String.valueOf (ObjId);
    public int hashCode ()
    return ((ObjId == null) ? 0 : ObjId.hashCode ());
    public boolean equals (Object obj)
    if (this == obj)
    return true;
    if (obj == null || obj.getClass () != getClass ())
    return false;
    ID other = (ID) obj;
    return ((ObjId == null && other.ObjId == null) ||
    (ObjId != null && ObjId.equals (other.ObjId)));
    private void fromString (String str)
    if ("null".equals (str))
    ObjId = null;
    else
    ObjId = new Long (str);
    private String attr1;
    public Parent()
    public void jdoPreStore()
    // Some Action that needs to be done before data is flushed to
    datastore...
    if (ObjId == null)
    if (pm == null)
    pm = ResourceManager.getPersistenceMgr("test", "sa", "");
    SequenceGenerator gen = KodoHelper.getSequenceGenerator (pm,
    Parent.class);
    setObjId(new Long(gen.getNext().longValue()));
    parent.jdo:
    <jdo>
    <package name="foo">
    <class name="Parent" identity-type="application"
    objectid-class="Parent$ID">
    <field name="ObjId" persistence-modifier="persistent"
    primary-key="true"/>
    <field name="attr1" persistence-modifier="persistent"/>
    </class>
    </package>
    </jdo>
    child.java:
    public class Child extends Parent
    implements Serializable,InstanceCallbacks
    private transient PersistenceManager pm = null;
    public static class ID extends Parent.ID
    static
    { // register persistent class in JVM
    Class c = foo.Child.class;
    public ID()
    super();
    public ID (String str)
    super(str);
    public void jdoPreStore()
    if (ObjId == null)
    if (pm == null)
    pm = ResourceManager.getPersistenceMgr("test", "sa", "");
    SequenceGenerator gen = KodoHelper.getSequenceGenerator (pm,
    Child.class);
    setObjId(new Long(gen.getNext().longValue()));
    child.jdo:
    <jdo>
    <package name="foo">
    <class name="Child" persistence-capable-superclass="foo.Parent"
    identity-type="application" objectid-class="Child$ID">
    <extension vendor-name="kodo" key="jdbc-class-map-name"
    value="vertical">
    <extension vendor-name="kodo" key="table" value="CHILD"/>
    <extension vendor-name="kodo" key="ref-column.OBJID"
    value="OBJID"/>
    </extension>
    <field name="attr2" persistence-modifier="persistent"/>
    </class>
    </package>
    </jdo>
    generated mappings by "mappingtool -a refresh":
    parent.mapping:
    <mapping>
    <package name="foo">
    <class name="Parent">
    <jdbc-class-map type="base" table="PARENT"/>
    <jdbc-version-ind type="version-number" column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="ObjId">
    <jdbc-field-map type="value" column="OBJID"/>
    </field>
    <field name="attr1">
    <jdbc-field-map type="value" column="ATTR1"/>
    </field>
    </class>
    </package>
    </mapping>
    child.mapping:
    <mapping>
    <package name="foo">
    <class name="Child">
    <jdbc-class-map type="vertical" ref-column.OBJID="OBJID"
    table="CHILD"/>
    <field name="attr2">
    <jdbc-field-map type="value" column="ATTR2"/>
    </field>
    </class>
    </package>
    </mapping>

    Hello,
    I want to implement Vertical Inheritance with Application ID Hierarchy,
    using a HyperSonic-Database. The essential code is appended.
    The following test-application leads to an exception. Things work fine,
    if I use one ID-class for all persistent classes; a similar attempt with
    horizontal inheritance did work, too.
    String attr1Val = getUniqueString();
    String attr2Val = getUniqueString();
    // ... get PersistenceManager, etc.
    // Write something into DB
    pm.currentTransaction().begin();
    Parent p = new Parent();
    p.setattr1("attr1Value");
    Child c = new Child();
    c.setattr1("qwerty");
    c.setattr2(attr2Val);
    pm.makePersistent(c);
    pm.currentTransaction().commit();
    // Query
    Query query = pm.newQuery(Child.class,"attr2 == param");
    query.declareParameters("String param");
    Collection results = (Collection)query.execute(attr2Val);
    kodo.util.FatalUserException: Duplicate object ids have been assigned to
    two different objects: the identity "1" of class "class foo.Child$ID" was
    assigned to both "foo.Child@1f4cbee" and "foo.Child@787d6a". This can
    occur when a horizontally or vertically mapped class uses application
    identity with an auto-increment field and does not use a hierarchy of
    application identity classes.[foo.Child$ID-1]
    Can anyone help ?
    Thanks.
    Lutz
    code-pieces:
    parent.java:
    public class Parent implements Serializable,InstanceCallbacks
    private transient PersistenceManager pm = null;
    public Long ObjId;
    public void setObjId(Long value)
    ObjId = value;
    // application identity class for Manager; represented as
    // a static inner class for the persistable class
    public static class ID implements Serializable
    static
    { // register persistent class in JVM
    Class c = foo.Parent.class;
    public Long ObjId;
    public ID ()
    public ID (String str)
    fromString (str);
    public String toString ()
    return String.valueOf (ObjId);
    public int hashCode ()
    return ((ObjId == null) ? 0 : ObjId.hashCode ());
    public boolean equals (Object obj)
    if (this == obj)
    return true;
    if (obj == null || obj.getClass () != getClass ())
    return false;
    ID other = (ID) obj;
    return ((ObjId == null && other.ObjId == null) ||
    (ObjId != null && ObjId.equals (other.ObjId)));
    private void fromString (String str)
    if ("null".equals (str))
    ObjId = null;
    else
    ObjId = new Long (str);
    private String attr1;
    public Parent()
    public void jdoPreStore()
    // Some Action that needs to be done before data is flushed to
    datastore...
    if (ObjId == null)
    if (pm == null)
    pm = ResourceManager.getPersistenceMgr("test", "sa", "");
    SequenceGenerator gen = KodoHelper.getSequenceGenerator (pm,
    Parent.class);
    setObjId(new Long(gen.getNext().longValue()));
    parent.jdo:
    <jdo>
    <package name="foo">
    <class name="Parent" identity-type="application"
    objectid-class="Parent$ID">
    <field name="ObjId" persistence-modifier="persistent"
    primary-key="true"/>
    <field name="attr1" persistence-modifier="persistent"/>
    </class>
    </package>
    </jdo>
    child.java:
    public class Child extends Parent
    implements Serializable,InstanceCallbacks
    private transient PersistenceManager pm = null;
    public static class ID extends Parent.ID
    static
    { // register persistent class in JVM
    Class c = foo.Child.class;
    public ID()
    super();
    public ID (String str)
    super(str);
    public void jdoPreStore()
    if (ObjId == null)
    if (pm == null)
    pm = ResourceManager.getPersistenceMgr("test", "sa", "");
    SequenceGenerator gen = KodoHelper.getSequenceGenerator (pm,
    Child.class);
    setObjId(new Long(gen.getNext().longValue()));
    child.jdo:
    <jdo>
    <package name="foo">
    <class name="Child" persistence-capable-superclass="foo.Parent"
    identity-type="application" objectid-class="Child$ID">
    <extension vendor-name="kodo" key="jdbc-class-map-name"
    value="vertical">
    <extension vendor-name="kodo" key="table" value="CHILD"/>
    <extension vendor-name="kodo" key="ref-column.OBJID"
    value="OBJID"/>
    </extension>
    <field name="attr2" persistence-modifier="persistent"/>
    </class>
    </package>
    </jdo>
    generated mappings by "mappingtool -a refresh":
    parent.mapping:
    <mapping>
    <package name="foo">
    <class name="Parent">
    <jdbc-class-map type="base" table="PARENT"/>
    <jdbc-version-ind type="version-number" column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="ObjId">
    <jdbc-field-map type="value" column="OBJID"/>
    </field>
    <field name="attr1">
    <jdbc-field-map type="value" column="ATTR1"/>
    </field>
    </class>
    </package>
    </mapping>
    child.mapping:
    <mapping>
    <package name="foo">
    <class name="Child">
    <jdbc-class-map type="vertical" ref-column.OBJID="OBJID"
    table="CHILD"/>
    <field name="attr2">
    <jdbc-field-map type="value" column="ATTR2"/>
    </field>
    </class>
    </package>
    </mapping>

  • Performance problem because of ignored index

    Hi,
    We have a performance problem with kodo ignoring indexes in Oracle:
    Our baseclass of all our persistent classes (LogasPoImpl) has a subclass
    CODEZOLLMASSNAHMENIMPL.
    We use vertical mapping for all subclasses and have 400.000 instances of
    CODEZOLLMASSNAHMENIMPL.
    We defined an additional index on an attribute of CODEZOLLMASSNAHMENIMPL.
    A query with a filter like "myIndexedAttribute = 'DE'" takes about 15
    seconds on Oracle 8.1.7.
    Kodo logs something like the following:
    [14903 ms] executing prepstmnt 6156689 SELECT (...)
    FROM CODEZOLLMASSNAHMENIMPL t0, LOGASPOIMPL t1
    WHERE (t0.myIndexedAttribute = ?)
    AND t1.JDOCLASS = ?
    AND t0.JDOID = t1.JDOID
    [params=(String) DE, (String)
    de.logas.zoll.eztneu.CodeZollMassnahmenImpl] [reused=0]
    When I execute the same statement from a SQL-prompt, it takes that long as
    well, but when I swap the tablenames in the from part
    (to "FROM LOGASPOIMPL t1, CODEZOLLMASSNAHMENIMPL t0") the result comes
    immediately.
    I've had a look at the query plans, oracle creates for the two statements
    and found, that our index on myIndexedAttribute is not used
    by the first statement, but it is by the second.
    How can I make Kodo use the faster statement?
    I've tried to use the "jdbc-indexed" tag, but without success so far.
    Thanks,
    Wolfgang

    Thank you very much, Stefan & Alex.
    After computing statistics the index is used and the performance is fine
    now.
    - Wolfgang
    Alex Roytman wrote:
    ANALYZE TABLE MY_TABLE COMPUTE STATISTICS;
    "Stefan" <[email protected]> wrote in message
    news:btlqsj$f18$[email protected]..
    When I execute the same statement from a SQL-prompt, it takes that longas
    well, but when I swap the tablenames in the from part
    (to "FROM LOGASPOIMPL t1, CODEZOLLMASSNAHMENIMPL t0") the result comes
    immediately.
    I've had a look at the query plans, oracle creates for the twostatements
    and found, that our index on myIndexedAttribute is not used
    by the first statement, but it is by the second.
    How can I make Kodo use the faster statement?
    I've tried to use the "jdbc-indexed" tag, but without success so far.I know that in DB2 there is a function called "Run Statistics" which you
    can (and should do) on all tables involved in a query (at least once a
    month, when there are heavy changes in the tables).
    On information gathered by this statistics DB2 can optimize your queries
    and execution path's
    Since I was once involved in query performance optimizing on DB/2 I can
    say you can get improvements of 80% on big tables on which statistics are
    run and not. (Since the execution plans created by the optimizer differ
    heavily)
    Since I'm working now with Oracle as well, at least I can say, that Oracle
    has a featere like statistics as well. (go into the manager enterprise
    Console and click on a table, you will find a row "statisitics last run")
    I don't know how to trigger these statistics nor whether they would
    influence the query execution path on oracle (thus "swapping" tablenames
    by itself), since I didn't have time to do further research on thatmatter.
    But it's worth a try to find out and maybe it helps on you problem ?

  • Inheritance in Kodo JDO 3.1.0

    Hi
    I am implementing inheritance in 2 classes and buys battling with it.
    I resorted to using the examples from the Kodo documentation and it is
    still not working.
    I am following the example in the documentation by the letter and no
    success. The subclass Tabloid is never generated. When I look at the
    generated mapping file - the following is generated.
    <mapping>
    <package name="biz.lautus.pfa.domain.test.kodo.vertical">
    <class name="Magazine">
    <jdbc-class-map type="base" pk-column="JDOID"
    table="MAGAZINE"/>
    <jdbc-version-ind type="version-number" column="JDOVERSION"/>
    <jdbc-class-ind type="in-class-name" column="JDOCLASS"/>
    <field name="title">
    <jdbc-field-map type="value" column="TITLE"/>
    </field>
    </class>
    <class name="Tabloid">
    <jdbc-class-map type="flat"/>
    <field name="tabloidType">
    <jdbc-field-map type="value" column="TABLOIDTYPE"/>
    </field>
    </class>
    </package>
    </mapping>
    What I am doing wrong?
    Must I only specify a jdo file or must a start to modify mapping files as
    well?
    Any help will be greatly appreciated
    My output from kodo.log is also at the bottom of the message...
    Here is the Java source and the jdo file.
    Magazine.java
    package biz.lautus.pfa.domain.test.kodo.vertical;
    public class Magazine
    private String title;
    Tabloid.java
    package biz.lautus.pfa.domain.test.kodo.vertical;
    public class Tabloid extends Magazine
    private String tabloidType;
    package.jdo
    <?xml version="1.0"?>
    <jdo>
    <package name="biz.lautus.pfa.domain.test.kodo.vertical">
    <class name="Magazine">
    <extension vendor-name="kodo" key="jdbc-class-map" value="vertical">
    <extension vendor-name="kodo" key="table" value="MAGAZINE"/>
    <extension vendor-name="kodo" key="pk-column" value="JDOID"/>
    </extension>
    </class>
    <class name="Tabloid" persistence-capable-superclass="Magazine">
    <extension vendor-name="kodo" key="jdbc-class-map" value="vertical">
    <extension vendor-name="kodo" key="table" value="TABLOID"/>
    <extension vendor-name="kodo" key="ref-column.JDOID"
    value="MAG_ID"/>
    </extension>
    </class>
    </package>
    </jdo>
    output from kodo.log
    348 INFO [main] kodo.Tool - Mapping tool running on type "class
    biz.lautus.pfa.domain.test.kodo.vertical.Magazine" with action "refresh".
    492 INFO [main] kodo.Tool - Mapping tool running on type "class
    biz.lautus.pfa.domain.test.kodo.vertical.Tabloid" with action "refresh".
    497 INFO [main] kodo.Tool - Recording mapping and schema changes.
    618 TRACE [main] kodo.jdbc.SQL - <t 22996593, conn 18434638> [106 ms]
    executing stmnt 25609906 CREATE TABLE MAGAZINE (JDOCLASS VARCHAR(255),
    JDOID int8 NOT NULL, JDOVERSION int4, TABLOIDTYPE VARCHAR(255), TITLE
    VARCHAR(255), CONSTRAINT P_MAGAZINE PRIMARY KEY (JDOID))
    622 TRACE [main] kodo.jdbc.SQL - <t 22996593, conn 18434638> [4 ms]
    executing stmnt 14651230 CREATE INDEX I_MGAZINE_JDOCLASS ON MAGAZINE
    (JDOCLASS)
    626 TRACE [main] kodo.jdbc.SQL - <t 22996593, conn 18434638> [3 ms]
    executing stmnt 20812788 CREATE INDEX I_MGAZINE_JDOVERSION ON MAGAZINE
    (JDOVERSION)
    638 TRACE [main] kodo.jdbc.SQL - <t 22996593, conn 18434638> [7 ms]
    executing stmnt 29140465 CREATE TABLE JDO_SEQUENCE (ID SMALLINT NOT NULL,
    SEQUENCE_VALUE int8, PRIMARY KEY (ID))
    350 INFO [main] kodo.Tool - Mapping tool running on type "class
    biz.lautus.pfa.domain.test.kodo.vertical.Magazine" with action "drop".
    449 INFO [main] kodo.Tool - Mapping tool running on type "class
    biz.lautus.pfa.domain.test.kodo.vertical.Tabloid" with action "drop".
    449 INFO [main] kodo.Tool - Recording mapping and schema changes.
    348 INFO [main] kodo.Tool - Mapping tool running on type "class
    biz.lautus.pfa.domain.test.kodo.vertical.Magazine" with action "refresh".
    489 INFO [main] kodo.Tool - Mapping tool running on type "class
    biz.lautus.pfa.domain.test.kodo.vertical.Tabloid" with action "refresh".
    495 INFO [main] kodo.Tool - Recording mapping and schema changes.

    Rudi-
    What examples can you give me today? Any example of either horizontal or
    vertical subclass mapping will work for me. I just do not want to use flat.Following are the mapping files for the samples we will include in the
    next 3.2 beta. They are completely unsupported (until, at least, 3.2
    final is released), but they may help you get on the right track.
    Note that they are using the .mapping file format, not the .jdo metadata
    format for mappings: you will need to either convert them to the .jdo
    mapping format, or else switch to using the "file" MappingFactory. The
    different mappings represent an identical object model, just using
    different inheritance strategies.
    Sample using Flat Mapping:
    <?xml version="1.0" encoding="UTF-8"?>
    <mapping>
    <package name="samples.models.school.flat">
    <class name="FlatAddress">
    <jdbc-class-map type="base" pk-column="PK" table="SCF_ADDRESS"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="metadata-value" column="ADDRESS_TYPE"/>
    <field name="city">
    <jdbc-field-map type="value" column="CITY"/>
    </field>
    <field name="phone">
    <jdbc-field-map type="value" column="PHONE"/>
    </field>
    <field name="state">
    <jdbc-field-map type="value" column="STATE"/>
    </field>
    <field name="street">
    <jdbc-field-map type="value" column="STREET"/>
    </field>
    <field name="zip">
    <jdbc-field-map type="value" column="ZIP"/>
    </field>
    </class>
    <class name="FlatAdmin">
    <jdbc-class-map type="flat"/>
    <field name="certifications">
    <jdbc-field-map type="collection"
                             element-column="ELEMENT" ref-column.PK="PK"
                             table="SCF_PERS_CERTS"/>
    </field>
    </class>
    <class name="FlatCourse">
    <jdbc-class-map type="base" pk-column="PK" table="SCF_COURSE"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="details">
    <jdbc-field-map type="value" column="DETAILS"/>
    </field>
    <field name="name">
    <jdbc-field-map type="value" column="NAME0"/>
    </field>
    <field name="shortDescription">
    <jdbc-field-map type="value" column="SHORTDESCRIPTION"/>
    </field>
    </class>
    <class name="FlatEmployee">
    <jdbc-class-map type="flat"/>
    <field name="hireDate">
    <jdbc-field-map type="value" column="HIREDATE"/>
    </field>
    <field name="jobTitle">
    <jdbc-field-map type="value" column="JOBTITLE"/>
    </field>
    <field name="manager">
    <jdbc-field-map type="one-one" column.PK="MANAGER_PK"/>
    </field>
    <field name="office">
    <jdbc-field-map type="value" column="OFFICE"/>
    </field>
    <field name="salary">
    <jdbc-field-map type="value" column="SALARY"/>
    </field>
    </class>
    <class name="FlatHomeAddress">
    <jdbc-class-map type="flat"/>
    <field name="emailAddress">
    <jdbc-field-map type="value" column="EMAILADDRESS"/>
    </field>
    </class>
    <class name="FlatParent">
    <jdbc-class-map type="flat"/>
    <field name="children">
    <jdbc-field-map type="many-many"
                             element-column.PK="CHILDREN_PK"
                             ref-column.PK="PARENT_PK"
                             table="SCF_PARENTHOOD"/>
    </field>
    <field name="workAddress">
    <jdbc-field-map type="one-one" column.PK="WORK_ADDRESS_ID"/>
    </field>
    </class>
    <class name="FlatPerson">
    <jdbc-class-map type="base" pk-column="PK" table="SCF_PERSON"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="metadata-value" column="PERSON_TYPE"/>
    <field name="dateOfBirth">
    <jdbc-field-map type="value" column="DATEOFBIRTH"/>
    </field>
    <field name="firstName">
    <jdbc-field-map type="value" column="FIRSTNAME"/>
    </field>
    <field name="homeAddress">
    <jdbc-field-map type="one-one" column.PK="HOMEADDRESS_PK"/>
    </field>
    <field name="lastName">
    <jdbc-field-map type="value" column="LASTNAME"/>
    </field>
    <field name="status">
    <jdbc-field-map type="value" column="STATUS"/>
    </field>
    </class>
    <class name="FlatScheduledClass">
    <jdbc-class-map type="base" pk-column="PK" table="SCF_SCH_CLASS"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="course">
    <jdbc-field-map type="one-one" column.PK="COURSE_PK"/>
    </field>
    <field name="students">
    <jdbc-field-map type="many-many"
                             element-column.PK="STUDENTS_PK" ref-column.PK="PK"
                             table="SCF_SCH_STUDENTS"/>
    </field>
    <field name="teacher">
    <jdbc-field-map type="one-one" column.PK="TEACHER_PK"/>
    </field>
    <field name="classPeriod">
    <jdbc-field-map type="value" column="PERIOD"/>
    </field>
    </class>
    <class name="FlatStaff">
    <jdbc-class-map type="flat"/>
    <field name="hrContact">
    <jdbc-field-map type="one-one" column.PK="HRCONTACT_PK"/>
    </field>
    </class>
    <class name="FlatStudent">
    <jdbc-class-map type="flat"/>
    <field name="grade">
    <jdbc-field-map type="value" column="GRADE"/>
    </field>
    <field name="parents">
    <jdbc-field-map type="many-many"
                             element-column.PK="PARENT_PK"
                             ref-column.PK="CHILDREN_PK"
                             table="SCF_PARENTHOOD"/>
    </field>
    <field name="scheduledClasses">
    <jdbc-field-map type="many-many"
                             element-column.PK="SCHCLASS_PK" ref-column.PK="PK"
                             table="SCF_PERS_SCHED"/>
    </field>
    </class>
    <class name="FlatTeacher">
    <jdbc-class-map type="flat"/>
    <field name="degree">
    <jdbc-field-map type="value" column="DEGREE"/>
    </field>
    <field name="qualifiedCourses">
    <jdbc-field-map type="many-many"
                             element-column.PK="QUALCOURSES_PK" ref-column.PK="PK"
                             table="SCF_PERS_QUALIFS"/>
    </field>
    <field name="scheduledClasses">
    <jdbc-field-map type="many-many"
                             element-column.PK="SCHEDCLASS_PK" ref-column.PK="PK"
                             table="SCF_PERS_SCHED"/>
    </field>
    </class>
    <class name="FlatWorkAddress">
    <jdbc-class-map type="flat"/>
    <field name="company">
    <jdbc-field-map type="value" column="COMPANY"/>
    </field>
    <field name="mailStop">
    <jdbc-field-map type="value" column="MAILSTOP"/>
    </field>
    </class>
    </package>
    </mapping>
    Sample using Vertical Mapping:
    <?xml version="1.0" encoding="UTF-8"?>
    <mapping>
    <package name="samples.models.school.vertical">
    <class name="VerticalAddress">
    <jdbc-class-map type="base" pk-column="PK" table="SCV_ADDRESS"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="metadata-value" column="ADDRESS_TYPE"/>
    <field name="city">
    <jdbc-field-map type="value" column="CITY"/>
    </field>
    <field name="phone">
    <jdbc-field-map type="value" column="PHONE"/>
    </field>
    <field name="state">
    <jdbc-field-map type="value" column="STATE"/>
    </field>
    <field name="street">
    <jdbc-field-map type="value" column="STREET"/>
    </field>
    <field name="zip">
    <jdbc-field-map type="value" column="ZIP"/>
    </field>
    </class>
    <class name="VerticalAdmin">
    <jdbc-class-map type="vertical" ref-column.PK="PK"
                        table="SCV_ADMIN"/>
    <field name="certifications">
    <jdbc-field-map type="collection" element-column="ELEMENT"
                             ref-column.PK="PK" table="SCV_CERTIFICATIONS"/>
    </field>
    </class>
    <class name="VerticalCourse">
    <jdbc-class-map type="base" pk-column="PK" table="SCV_COURSE"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="details">
    <jdbc-field-map type="value" column="DETAILS"/>
    </field>
    <field name="name">
    <jdbc-field-map type="value" column="NAME0"/>
    </field>
    <field name="shortDescription">
    <jdbc-field-map type="value" column="SHORTDESCRIPTION"/>
    </field>
    </class>
    <class name="VerticalEmployee">
    <jdbc-class-map type="vertical" ref-column.PK="PK"
                        table="SCV_EMPLOYEE"/>
    <field name="hireDate">
    <jdbc-field-map type="value" column="HIREDATE"/>
    </field>
    <field name="jobTitle">
    <jdbc-field-map type="value" column="JOBTITLE"/>
    </field>
    <field name="manager">
    <jdbc-field-map type="one-one" column.PK="MANAGER_PK"/>
    </field>
    <field name="office">
    <jdbc-field-map type="value" column="OFFICE"/>
    </field>
    <field name="salary">
    <jdbc-field-map type="value" column="SALARY"/>
    </field>
    </class>
    <class name="VerticalHomeAddress">
    <jdbc-class-map type="vertical" ref-column.PK="PK"
                        table="SCV_HOMEADDRESS"/>
    <field name="emailAddress">
    <jdbc-field-map type="value" column="EMAILADDRESS"/>
    </field>
    </class>
    <class name="VerticalParent">
    <jdbc-class-map type="vertical" ref-column.PK="PK"
                        table="SCV_PARENT"/>
    <field name="children">
    <jdbc-field-map type="many-many"
                             element-column.PK="CHILDREN_PK"
                             ref-column.PK="PARENT_PK"
                             table="SCV_PARENTHOOD"/>
    </field>
    <field name="workAddress">
    <jdbc-field-map type="one-one" column.PK="WORKADDRESS_PK"/>
    </field>
    </class>
    <class name="VerticalPerson">
    <jdbc-class-map type="base" pk-column="PK" table="SCV_PERSON"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="metadata-value" column="PERSON_TYPE"/>
    <field name="dateOfBirth">
    <jdbc-field-map type="value" column="DATEOFBIRTH"/>
    </field>
    <field name="firstName">
    <jdbc-field-map type="value" column="FIRSTNAME"/>
    </field>
    <field name="homeAddress">
    <jdbc-field-map type="one-one" column.PK="HOMEADDRESS_PK"/>
    </field>
    <field name="lastName">
    <jdbc-field-map type="value" column="LASTNAME"/>
    </field>
    <field name="status">
    <jdbc-field-map type="value" column="STATUS"/>
    </field>
    </class>
    <class name="VerticalScheduledClass">
    <jdbc-class-map type="base" pk-column="PK"
                        table="SCV_SCHEDULEDCLASS"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="classPeriod">
    <jdbc-field-map type="value" column="CLASSPERIOD"/>
    </field>
    <field name="course">
    <jdbc-field-map type="one-one" column.PK="COURSE_PK"/>
    </field>
    <field name="students">
    <jdbc-field-map type="many-many"
                             element-column.PK="STUDENTS_PK" ref-column.PK="PK"
                             table="SCV_STUDENTS"/>
    </field>
    <field name="teacher">
    <jdbc-field-map type="one-one" column.PK="TEACHER_PK"/>
    </field>
    </class>
    <class name="VerticalStaff">
    <jdbc-class-map type="vertical" ref-column.PK="PK"
                        table="SCV_STAFF"/>
    <field name="hrContact">
    <jdbc-field-map type="one-one" column.PK="HRCONTACT_PK"/>
    </field>
    </class>
    <class name="VerticalStudent">
    <jdbc-class-map type="vertical" ref-column.PK="PK"
                        table="SCV_STUDENT"/>
    <field name="grade">
    <jdbc-field-map type="value" column="GRADE"/>
    </field>
    <field name="parents">
    <jdbc-field-map type="many-many"
                             element-column.PK="PARENT_PK"
                             ref-column.PK="CHILDREN_PK"
                             table="SCV_PARENTHOOD"/>
    </field>
    <field name="scheduledClasses">
    <jdbc-field-map type="many-many"
                             element-column.PK="SCHEDULEDCLASSES_PK"
                             ref-column.PK="PK" table="SCV_SCHEDULEDCLASSES"/>
    </field>
    </class>
    <class name="VerticalTeacher">
    <jdbc-class-map type="vertical" ref-column.PK="PK"
                        table="SCV_TEACHER"/>
    <field name="degree">
    <jdbc-field-map type="value" column="DEGREE"/>
    </field>
    <field name="qualifiedCourses">
    <jdbc-field-map type="many-many"
                             element-column.PK="QUALIFIEDCOURSES_PK"
                             ref-column.PK="PK" table="SCV_QUALIFIEDCOURSES"/>
    </field>
    <field name="scheduledClasses">
    <jdbc-field-map type="many-many"
                             element-column.PK="SCHEDULEDCLASSES_PK"
                             ref-column.PK="PK" table="SCV_TEACHER_CLASSES"/>
    </field>
    </class>
    <class name="VerticalWorkAddress">
    <jdbc-class-map type="vertical" ref-column.PK="PK"
                        table="SCV_WORKADDRESS"/>
    <field name="company">
    <jdbc-field-map type="value" column="COMPANY"/>
    </field>
    <field name="mailStop">
    <jdbc-field-map type="value" column="MAILSTOP"/>
    </field>
    </class>
    </package>
    </mapping>
    Sample using Horizontal Mapping:
    <?xml version="1.0" encoding="UTF-8"?>
    <mapping>
    <package name="samples.models.school.horizontal">
    <class name="HorizontalAddress">
    <jdbc-class-map type="horizontal"/>
    </class>
    <class name="HorizontalAdmin">
    <jdbc-class-map type="base" pk-column="PK" table="SCH_ADMIN"/>
    <jdbc-version-ind type="state-image"/>
    <field name="certifications">
    <jdbc-field-map type="collection"
                             element-column="ELEMENT" ref-column.PK="PK"
                             table="SCH_ADMIN_CERTS"/>
    </field>
    <field name="HorizontalPerson.dateOfBirth">
    <jdbc-field-map type="value" column="DATEOFBIRTH"/>
    </field>
    <field name="HorizontalPerson.firstName">
    <jdbc-field-map type="value" column="FIRSTNAME"/>
    </field>
    <field name="HorizontalPerson.homeAddress">
    <jdbc-field-map type="one-one" column.PK="HOMEADDRESS_PK"/>
    </field>
    <field name="HorizontalPerson.lastName">
    <jdbc-field-map type="value" column="LASTNAME"/>
    </field>
    <field name="HorizontalPerson.status">
    <jdbc-field-map type="value" column="STATUS"/>
    </field>
    <field name="HorizontalEmployee.hireDate">
    <jdbc-field-map type="value" column="HIREDATE"/>
    </field>
    <field name="HorizontalEmployee.jobTitle">
    <jdbc-field-map type="value" column="JOBTITLE"/>
    </field>
    <field name="HorizontalEmployee.manager">
    <jdbc-field-map type="pc" column="MANAGER"/>
    </field>
    <field name="HorizontalEmployee.office">
    <jdbc-field-map type="value" column="OFFICE"/>
    </field>
    <field name="HorizontalEmployee.salary">
    <jdbc-field-map type="value" column="SALARY"/>
    </field>
    </class>
    <class name="HorizontalCourse">
    <jdbc-class-map type="base" pk-column="PK" table="SCH_COURSE"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="details">
    <jdbc-field-map type="value" column="DETAILS"/>
    </field>
    <field name="name">
    <jdbc-field-map type="value" column="NAME0"/>
    </field>
    <field name="shortDescription">
    <jdbc-field-map type="value" column="SHORTDESCRIPTION"/>
    </field>
    </class>
    <class name="HorizontalEmployee">
    <jdbc-class-map type="horizontal"/>
    </class>
    <class name="HorizontalHomeAddress">
    <jdbc-class-map type="base" pk-column="PK" table="SCH_HOMEADDRESS"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="emailAddress">
    <jdbc-field-map type="value" column="EMAILADDRESS"/>
    </field>
    <field name="HorizontalAddress.city">
    <jdbc-field-map type="value" column="CITY"/>
    </field>
    <field name="HorizontalAddress.phone">
    <jdbc-field-map type="value" column="PHONE"/>
    </field>
    <field name="HorizontalAddress.state">
    <jdbc-field-map type="value" column="STATE"/>
    </field>
    <field name="HorizontalAddress.street">
    <jdbc-field-map type="value" column="STREET"/>
    </field>
    <field name="HorizontalAddress.zip">
    <jdbc-field-map type="value" column="ZIP"/>
    </field>
    </class>
    <class name="HorizontalParent">
    <jdbc-class-map type="base" pk-column="PK" table="SCH_PARENT"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="children">
    <jdbc-field-map type="many-many"
                             element-column.PK="CHILDREN_PK"
                             ref-column.PK="PARENT_PK"
                             table="SCH_PARENTHOOD"/>
    </field>
    <field name="HorizontalPerson.dateOfBirth">
    <jdbc-field-map type="value" column="DATEOFBIRTH"/>
    </field>
    <field name="HorizontalPerson.firstName">
    <jdbc-field-map type="value" column="FIRSTNAME"/>
    </field>
    <field name="HorizontalPerson.homeAddress">
    <jdbc-field-map type="one-one" column.PK="HOMEADDRESS_PK"/>
    </field>
    <field name="HorizontalPerson.lastName">
    <jdbc-field-map type="value" column="LASTNAME"/>
    </field>
    <field name="HorizontalPerson.status">
    <jdbc-field-map type="value" column="STATUS"/>
    </field>
    <field name="workAddress">
    <jdbc-field-map type="one-one" column.PK="WORKADDRESS_PK"/>
    </field>
    </class>
    <class name="HorizontalPerson">
    <jdbc-class-map type="horizontal"/>
    </class>
    <class name="HorizontalScheduledClass">
    <jdbc-class-map type="base" pk-column="PK"
                             table="SCH_SCHEDULEDCLASS"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="classPeriod">
    <jdbc-field-map type="value" column="CLASSPERIOD"/>
    </field>
    <field name="course">
    <jdbc-field-map type="one-one" column.PK="COURSE_PK"/>
    </field>
    <field name="students">
    <jdbc-field-map type="many-many"
                             element-column.PK="STUDENTS_PK" ref-column.PK="PK"
                             table="SCH_CLASS_STUDENT"/>
    </field>
    <field name="teacher">
    <jdbc-field-map type="one-one" column.PK="TEACHER_PK"/>
    </field>
    </class>
    <class name="HorizontalStaff">
    <jdbc-class-map type="base" pk-column="PK" table="SCH_STAFF"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="hrContact">
    <jdbc-field-map type="one-one" column.PK="HRCONTACT_PK"/>
    </field>
    <field name="HorizontalEmployee.hireDate">
    <jdbc-field-map type="value" column="HIREDATE"/>
    </field>
    <field name="HorizontalEmployee.jobTitle">
    <jdbc-field-map type="value" column="JOBTITLE"/>
    </field>
    <field name="HorizontalEmployee.manager">
    <jdbc-field-map type="pc" column="MANAGER"/>
    </field>
    <field name="HorizontalEmployee.office">
    <jdbc-field-map type="value" column="OFFICE"/>
    </field>
    <field name="HorizontalEmployee.salary">
    <jdbc-field-map type="value" column="SALARY"/>
    </field>
    <field name="HorizontalPerson.dateOfBirth">
    <jdbc-field-map type="value" column="DATEOFBIRTH"/>
    </field>
    <field name="HorizontalPerson.firstName">
    <jdbc-field-map type="value" column="FIRSTNAME"/>
    </field>
    <field name="HorizontalPerson.homeAddress">
    <jdbc-field-map type="one-one" column.PK="HOMEADDRESS_PK"/>
    </field>
    <field name="HorizontalPerson.lastName">
    <jdbc-field-map type="value" column="LASTNAME"/>
    </field>
    <field name="HorizontalPerson.status">
    <jdbc-field-map type="value" column="STATUS"/>
    </field>
    </class>
    <class name="HorizontalStudent">
    <jdbc-class-map type="base" pk-column="PK" table="SCH_STUDENT"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="grade">
    <jdbc-field-map type="value" column="GRADE"/>
    </field>
    <field name="parents">
    <jdbc-field-map type="many-many"
                             element-column.PK="PARENT_PK"
                             ref-column.PK="CHILDREN_PK"
                             table="SCH_PARENTHOOD"/>
    </field>
    <field name="HorizontalPerson.dateOfBirth">
    <jdbc-field-map type="value" column="DATEOFBIRTH"/>
    </field>
    <field name="HorizontalPerson.firstName">
    <jdbc-field-map type="value" column="FIRSTNAME"/>
    </field>
    <field name="HorizontalPerson.homeAddress">
    <jdbc-field-map type="one-one" column.PK="HOMEADDRESS_PK"/>
    </field>
    <field name="HorizontalPerson.lastName">
    <jdbc-field-map type="value" column="LASTNAME"/>
    </field>
    <field name="HorizontalPerson.status">
    <jdbc-field-map type="value" column="STATUS"/>
    </field>
    <field name="scheduledClasses">
    <jdbc-field-map type="many-many"
                             element-column.PK="SCHEDULEDCLASSES_PK" ref-column.PK="PK"
                             table="SCH_SCHEDULEDCLASSES"/>
    </field>
    </class>
    <class name="HorizontalTeacher">
    <jdbc-class-map type="base" pk-column="PK" table="SCH_TEACHER"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="degree">
    <jdbc-field-map type="value" column="DEGREE"/>
    </field>
    <field name="qualifiedCourses">
    <jdbc-field-map type="many-many"
                             element-column.PK="QUALIFIEDCOURSES_PK"
                             ref-column.PK="PK" table="SCH_TEACHER_QUALS"/>
    </field>
    <field name="HorizontalEmployee.hireDate">
    <jdbc-field-map type="value" column="HIREDATE"/>
    </field>
    <field name="HorizontalEmployee.jobTitle">
    <jdbc-field-map type="value" column="JOBTITLE"/>
    </field>
    <field name="HorizontalEmployee.manager">
    <jdbc-field-map type="pc" column="MANAGER"/>
    </field>
    <field name="HorizontalEmployee.office">
    <jdbc-field-map type="value" column="OFFICE"/>
    </field>
    <field name="HorizontalEmployee.salary">
    <jdbc-field-map type="value" column="SALARY"/>
    </field>
    <field name="HorizontalPerson.dateOfBirth">
    <jdbc-field-map type="value" column="DATEOFBIRTH"/>
    </field>
    <field name="HorizontalPerson.firstName">
    <jdbc-field-map type="value" column="FIRSTNAME"/>
    </field>
    <field name="HorizontalPerson.homeAddress">
    <jdbc-field-map type="one-one" column.PK="HOMEADDRESS_PK"/>
    </field>
    <field name="HorizontalPerson.lastName">
    <jdbc-field-map type="value" column="LASTNAME"/>
    </field>
    <field name="HorizontalPerson.status">
    <jdbc-field-map type="value" column="STATUS"/>
    </field>
    <field name="scheduledClasses">
    <jdbc-field-map type="many-many"
                             element-column.PK="SCHEDULEDCLASSES_PK"
                             ref-column.PK="PK" table="SCH_TEACHER_CLASSES"/>
    </field>
    </class>
    <class name="HorizontalWorkAddress">
    <jdbc-class-map type="base" pk-column="PK" table="SCH_WORKADDRESS"/>
    <jdbc-version-ind type="state-image"/>
    <jdbc-class-ind type="none"/>
    <field name="company">
    <jdbc-field-map type="value" column="COMPANY"/>
    </field>
    <field name="mailStop">
    <jdbc-field-map type="value" column="MAILSTOP"/>
    </field>
    <field name="HorizontalAddress.city">
    <jdbc-field-map type="value" column="CITY"/>
    </field>
    <field name="HorizontalAddress.phone">
    <jdbc-field-map type="value" column="PHONE"/>
    </field>
    <field name="HorizontalAddress.state">
    <jdbc-field-map type="value" column="STATE"/>
    </field>
    <field name="HorizontalAddress.street">
    <jdbc-field-map type="value" column="STREET"/>
    </field>
    <field name="HorizontalAddress.zip">
    <jdbc-field-map type="value" column="ZIP"/>
    </field>
    </class>
    </package>
    </mapping>
    In article <[email protected]>, Rudi Engelbrecht wrote:
    Abe White wrote:
    That is exactly what I am doing, I am copying it verbatim from the docs. I
    am using the base tag.
    Not according to the code you posted previously. In that code, your
    subclass was using a jdbc-class-map type of "horizontal" rather than
    "base". Can you double check?I used base in the code - see the previous article where I explain that I
    changed horizontal to base as well. When it is base the mappingtool
    crashes with a null pointer as explained in the previous article.
    When it is horizontal the mappingtool does not crash, but does not of
    course create the table. <-- this is not my problem. My problem is that
    specifying base the mappingtool crashes.
    Also, are you using the "metadata" mapping factory?Yes, I enabled it in the kodo.properties file...
    Do you guys actually have a working example of either horizontal or
    vertical subclass mapping? With source?
    We will in the next 3.2 beta; we've already created several new model
    samples internally.What examples can you give me today? Any example of either horizontal or
    vertical subclass mapping will work for me. I just do not want to use flat.--
    Marc Prud'hommeaux
    SolarMetric Inc.

  • Kodo 3.2.0b2 Now Available!

    All,
    Kodo 3.2.0b2 is now available. Get your copy while supplies last only from
    SolarMetric at:
    http://solarmetric.com/jdo/beta/3.2.0b2/
    There are a number of exciting new features in 3.2.0b2, as well as a number
    of fixes to bugs in the first beta:
    a.. Many new JDO 2 preview features
    b.. Improved eager fetching
    c.. Query result grouping
    d.. Query result ranges
    e.. New built-in JDOQL methods
    f.. Many other new features and bugfixes
    g.. Intersystems Cach__ database support
    h.. Many improvements to the Kodo workbench
    You can find the release notes at:
    http://www.solarmetric.com/Software/Documentation/3.2.0b2/docs/relnotes.html
    Good luck, and enjoy!
    -Greg
    SolarMetric
    www.solarmetric.com

    Using a class indicator will typically be faster. We added the
    subclass-join capability largely to support legacy schemas that don't
    have an indicator.
    -Patrick
    Alex Roytman wrote:
    How would you compare performance of fetching vertically mapped class
    hierarchy using subclass-join indicator (outer joins) vs traditional fetch
    based on class indicator? I often seen poor performance with outer joins
    especially if you have several of them and some inner joins as well. In some
    cases UNION ALL worked much better
    "Greg Campbell" <[email protected]> wrote in message
    news:ch2tfg$mp2$[email protected]..
    All,
    Kodo 3.2.0RC1 is now available. Feel free to download it at:
    http://www.solarmetric.com/jdo/Evaluate/
    There are a number of exciting new features in 3.2.0RC1, as well as a
    number
    of fixes to bugs found during the beta period:
    * Many new JDO 2 preview features
    * Single string JDOQL
    * Named queries
    * Optional managed inverses
    * Improved eager fetching
    * Many other new features and bugfixes
    You can find the release notes at:
    http://www.solarmetric.com/Software/Documentation/3.2.0RC1/docs/relnotes.html
    As this is a release candidate, please report any issues that you find to
    the Kodo
    beta newsgroup (solarmetric.kodo.beta).
    Good luck, and enjoy!
    -Greg
    SolarMetric
    www.solarmetric.com

  • Kodo 3.2.0RC1 Now Available

    All,
    Kodo 3.2.0RC1 is now available. Feel free to download it at:
    http://www.solarmetric.com/jdo/Evaluate/
    There are a number of exciting new features in 3.2.0RC1, as well as a number
    of fixes to bugs found during the beta period:
    * Many new JDO 2 preview features
    * Single string JDOQL
    * Named queries
    * Optional managed inverses
    * Improved eager fetching
    * Many other new features and bugfixes
    You can find the release notes at:
    http://www.solarmetric.com/Software/Documentation/3.2.0RC1/docs/relnotes.html
    As this is a release candidate, please report any issues that you find to
    the Kodo
    beta newsgroup (solarmetric.kodo.beta).
    Good luck, and enjoy!
    -Greg
    SolarMetric
    www.solarmetric.com

    Using a class indicator will typically be faster. We added the
    subclass-join capability largely to support legacy schemas that don't
    have an indicator.
    -Patrick
    Alex Roytman wrote:
    How would you compare performance of fetching vertically mapped class
    hierarchy using subclass-join indicator (outer joins) vs traditional fetch
    based on class indicator? I often seen poor performance with outer joins
    especially if you have several of them and some inner joins as well. In some
    cases UNION ALL worked much better
    "Greg Campbell" <[email protected]> wrote in message
    news:ch2tfg$mp2$[email protected]..
    All,
    Kodo 3.2.0RC1 is now available. Feel free to download it at:
    http://www.solarmetric.com/jdo/Evaluate/
    There are a number of exciting new features in 3.2.0RC1, as well as a
    number
    of fixes to bugs found during the beta period:
    * Many new JDO 2 preview features
    * Single string JDOQL
    * Named queries
    * Optional managed inverses
    * Improved eager fetching
    * Many other new features and bugfixes
    You can find the release notes at:
    http://www.solarmetric.com/Software/Documentation/3.2.0RC1/docs/relnotes.html
    As this is a release candidate, please report any issues that you find to
    the Kodo
    beta newsgroup (solarmetric.kodo.beta).
    Good luck, and enjoy!
    -Greg
    SolarMetric
    www.solarmetric.com

  • Kodo 3.2.3 Now Available!

    All,
    Kodo 3.2.3 is now available. Feel free to download it at:
    http://www.solarmetric.com/jdo/Evaluate/
    There are a number of bug fixes in the release.
    You can find the release notes at:
    http://www.solarmetric.com/Software/Documentation/3.2.3/docs/relnotes.html
    Enjoy!
    -Greg
    SolarMetric
    www.solarmetric.com

    Using a class indicator will typically be faster. We added the
    subclass-join capability largely to support legacy schemas that don't
    have an indicator.
    -Patrick
    Alex Roytman wrote:
    How would you compare performance of fetching vertically mapped class
    hierarchy using subclass-join indicator (outer joins) vs traditional fetch
    based on class indicator? I often seen poor performance with outer joins
    especially if you have several of them and some inner joins as well. In some
    cases UNION ALL worked much better
    "Greg Campbell" <[email protected]> wrote in message
    news:ch2tfg$mp2$[email protected]..
    All,
    Kodo 3.2.0RC1 is now available. Feel free to download it at:
    http://www.solarmetric.com/jdo/Evaluate/
    There are a number of exciting new features in 3.2.0RC1, as well as a
    number
    of fixes to bugs found during the beta period:
    * Many new JDO 2 preview features
    * Single string JDOQL
    * Named queries
    * Optional managed inverses
    * Improved eager fetching
    * Many other new features and bugfixes
    You can find the release notes at:
    http://www.solarmetric.com/Software/Documentation/3.2.0RC1/docs/relnotes.html
    As this is a release candidate, please report any issues that you find to
    the Kodo
    beta newsgroup (solarmetric.kodo.beta).
    Good luck, and enjoy!
    -Greg
    SolarMetric
    www.solarmetric.com

  • Kodo 3.3.3 Now Available!

    All,
    Kodo 3.3.3 is now available. Feel free to download it at:
    http://www.solarmetric.com/jdo/Evaluate/
    There are a number of bug fixes in the release.
    You can find the release notes at:
    http://www.solarmetric.com/Software/Documentation/3.3.3/docs/relnotes.html
    Enjoy!
    -Greg
    SolarMetric
    www.solarmetric.com

    Using a class indicator will typically be faster. We added the
    subclass-join capability largely to support legacy schemas that don't
    have an indicator.
    -Patrick
    Alex Roytman wrote:
    How would you compare performance of fetching vertically mapped class
    hierarchy using subclass-join indicator (outer joins) vs traditional fetch
    based on class indicator? I often seen poor performance with outer joins
    especially if you have several of them and some inner joins as well. In some
    cases UNION ALL worked much better
    "Greg Campbell" <[email protected]> wrote in message
    news:ch2tfg$mp2$[email protected]..
    All,
    Kodo 3.2.0RC1 is now available. Feel free to download it at:
    http://www.solarmetric.com/jdo/Evaluate/
    There are a number of exciting new features in 3.2.0RC1, as well as a
    number
    of fixes to bugs found during the beta period:
    * Many new JDO 2 preview features
    * Single string JDOQL
    * Named queries
    * Optional managed inverses
    * Improved eager fetching
    * Many other new features and bugfixes
    You can find the release notes at:
    http://www.solarmetric.com/Software/Documentation/3.2.0RC1/docs/relnotes.html
    As this is a release candidate, please report any issues that you find to
    the Kodo
    beta newsgroup (solarmetric.kodo.beta).
    Good luck, and enjoy!
    -Greg
    SolarMetric
    www.solarmetric.com

  • Query loading non-candidate subclasses

    Given a class hierarchy as follows:
    A
    B extends A
    C extends A
    When I execute a query looking only for B.class Kodo attempts to load C,
    even though its not a possible result from the query. Its quite irritating,
    is there any way to control this? Is it a bug or a side effect of something
    else?
    java.lang.ClassNotFoundException: B
    INFO - [junit]      at
    kodo.jdbc.runtime.JDBCStoreManager.loadSubclasses(JDBCStoreManager.java:1211
    INFO - [junit]      at
    kodo.jdbc.runtime.JDBCStoreManager.addClassConditions(JDBCStoreManager.java:
    958)
    INFO - [junit]      at
    kodo.jdbc.runtime.JDBCStoreManager.selectMappings(JDBCStoreManager.java:921)
    INFO - [junit]      at
    kodo.jdbc.runtime.JDBCStoreManager.access$300(JDBCStoreManager.java:33)
    INFO - [junit]      at
    kodo.jdbc.runtime.JDBCStoreManager$SelectImpl.selectInternal(JDBCStoreManage
    r.java:1332)
    INFO - [junit]      at
    kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:308)
    INFO - [junit]      at
    kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:299)
    INFO - [junit]      at
    kodo.jdbc.query.JDBCExpressionFactory.select(JDBCExpressionFactory.java:137)
    INFO - [junit]      at
    kodo.jdbc.query.JDBCQuery.executeQuery(JDBCQuery.java:111)
    INFO - [junit]      at
    kodo.query.JDOQLQuery$DataStoreQueryExecutor.executeQuery(JDOQLQuery.java:45
    4)
    INFO - [junit]      at
    kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:725)
    Thanks,
    Dylan

    Are you using Kodo 3.1? It sounds like you'd need to define A to use a
    virtual mapping (part of Kodo 3.1's horizontal mapping support), and
    then B and C both to use base mappings, B's subclasses to use flat
    mappings, and C's subclasses to use vertical.
    -Patrick
    D. Wilson wrote:
    (The inheritance tree is a little more complicated than I indicated)
    The side of the tree where B lives are all flat mapped to one table
    The side of the tree where C lives is vertically mapped to its own table
    therefore B and C are not in the same table.
    Dylan
    "Patrick Linskey" <[email protected]> wrote in message
    news:[email protected]...
    What does your mapping info look like? In particular, what are you doing
    for a subclass strategy?
    -Patrick
    D. Wilson wrote:
    Given a class hierarchy as follows:
    A
    B extends A
    C extends A
    When I execute a query looking only for B.class Kodo attempts to load
    C,
    even though its not a possible result from the query. Its quiteirritating,
    is there any way to control this? Is it a bug or a side effect ofsomething
    else?
    java.lang.ClassNotFoundException: B
    INFO - [junit] at
    kodo.jdbc.runtime.JDBCStoreManager.loadSubclasses(JDBCStoreManager.java:1211
    INFO - [junit] at
    kodo.jdbc.runtime.JDBCStoreManager.addClassConditions(JDBCStoreManager.java:
    958)
    INFO - [junit] at
    kodo.jdbc.runtime.JDBCStoreManager.selectMappings(JDBCStoreManager.java:921)
    INFO - [junit] at
    kodo.jdbc.runtime.JDBCStoreManager.access$300(JDBCStoreManager.java:33)
    INFO - [junit] at
    kodo.jdbc.runtime.JDBCStoreManager$SelectImpl.selectInternal(JDBCStoreManage
    r.java:1332)
    INFO - [junit] at
    kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:308)
    INFO - [junit] at
    kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:299)
    INFO - [junit] at
    kodo.jdbc.query.JDBCExpressionFactory.select(JDBCExpressionFactory.java:137)
    INFO - [junit] at
    kodo.jdbc.query.JDBCQuery.executeQuery(JDBCQuery.java:111)
    INFO - [junit] at
    kodo.query.JDOQLQuery$DataStoreQueryExecutor.executeQuery(JDOQLQuery.java:45
    4)
    INFO - [junit] at
    kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:725)
    Thanks,
    Dylan

  • Kodo resultset does not match sqlplus query result

    We are attempting to use Kodo's vertical mapping jdo capability to allow
    our application's drop down pick lists tsupport multiple languages.
    With most of the pick lists/ code tables it appears to work properly.
    But with 2 pick lists/ code tables the result sets do retrieved thro
    kodo jdo do not match what happens thru sqlplus.
    Even though the query asks for only English records, Kodo retrieve 1
    record in arabic.
    This does not happen in sqlplus
    We are using Oracle 10.2.1 and Kodo jdo 3.3
    Below is a the kodo trace and sqlplus result
    Thanks!
    ---------------Getting picklist for class: class
    gov.state.pisces.jdo.EntryStatusL language en
    25375 TRACE [javawsApplicationMain] kodo.Query - executing query: select
    from gov.state.pisces.jdo.EntryStatusL where visible == 1 &&
    language.languageCode=='en' order by name ascending
    25390 TRACE [javawsApplicationMain] kodo.jdbc.SQL - <t 12742366, conn
    16761835> [15 ms] executing prepstmnt 12406210 SELECT t1.ENTRY_STATUS_ID,
    t0.ID, t1.ENTRY_STATUS_CODE, t1.MODIFICATION_DATE,
    t1.MODIFICATION_USER_ID, t1.OWNER, t1.VISIBLE, t0.LANGUAGE_ID,
    t0.MODIFICATION_DATE, t0.MODIFICATION_USER_ID, t0.NAME, t0.OWNER FROM
    COMMON.LANGUAGE t2, TRAVELER.ENTRY_STATUS t1, TRAVELER.ENTRY_STATUS_L t0
    WHERE (t1.VISIBLE = ? AND t2.LANGUAGE_CODE = ?) AND t0.ID =
    t1.ENTRY_STATUS_ID AND t0.LANGUAGE_ID = t2.LANGUAGE_ID ORDER BY t0.NAME
    ASC [params=(int) 1, (String) en] [reused=0]
    Entry Status Lang Id 29
    25390 TRACE [javawsApplicationMain] kodo.jdbc.SQL - <t 12742366, conn
    16761835> [0 ms] executing prepstmnt 6628690 SELECT t0.LANGUAGE_CODE,
    t0.LANGUAGE_NAME, t0.LOCAL, t0.MODIFICATION_DATE, t0.MODIFICATION_USER_ID,
    t0.OWNER FROM COMMON.LANGUAGE t0 WHERE t0.LANGUAGE_ID = ? [params=(long)
    29] [reused=0]
    Entry Status Lang Code en
    Entry Status Lang Id 29
    Entry Status Lang Code en
    Entry Status Lang Id 6
    25390 TRACE [javawsApplicationMain] kodo.jdbc.SQL - <t 12742366, conn
    16761835> [0 ms] executing prepstmnt 6628690 SELECT t0.LANGUAGE_CODE,
    t0.LANGUAGE_NAME, t0.LOCAL, t0.MODIFICATION_DATE, t0.MODIFICATION_USER_ID,
    t0.OWNER FROM COMMON.LANGUAGE t0 WHERE t0.LANGUAGE_ID = ? [params=(long)
    6] [reused=1]
    Entry Status Lang Code ar
    WO class gov.state.pisces.jdo.EntryStatusL
    WU 6
    WO ????
    Below is sqlplus results
    oracle@ni2 ~]$ sqlplus p_pw1
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 3 20:09:52 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    P_PW1@pisces > @/tmp/l2
    6
    P_PW1@pisces > r
    1 SELECT
    2 t0.LANGUAGE_ID,
    3 t0.NAME
    4 FROM COMMON.LANGUAGE t2, TRAVELER.ENTRY_STATUS t1,
    TRAVELER.ENTRY_STATUS_L
    t0
    5* WHERE (t1.VISIBLE = 1 AND t2.LANGUAGE_CODE = 'en' ) AND t0.ID =
    t1.ENTRY_ST
    ATUS_ID AND t0.LANGUAGE_ID = t2.LANGUAGE_ID
    LANGUAGE_ID
    NAME
    29
    Arriving
    29
    Departing
    29
    Transit
    P_PW1@pisces >

    Abe White wrote:
    Without understanding your model it's pretty difficult to follow the
    SQL. Do you use application identity? It could be a problem with your
    application identity class. Also, does your base class have a class
    indicator (jdbc-class-ind)? Do you do anything strange like attempt to
    use the same primary key value for multiple records?We are using identity-type of "application". We are not using
    jdbc-class-ind.
    I will stick here wuth the entry_status codess.
    Entry_status is the base and entry_status_l has language specific info
    Entry status has one primary key - Entry_status_id
    Entry_status_l has 2 keys id and language_id
    ( language_id is the primary key to the language table )
    Below are the jdos and the oracle table descriptions
    EntryStatus.jdo
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="gov.state.pisces.jdo">
    <class name="EntryStatus" identity-type="application">
    <extension vendor-name="kodo" key="jdbc-class-ind"
    value="subclass-join"/>
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="base">
    <extension vendor-name="kodo" key="table"
    value="TRAVELER.ENTRY_STATUS"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="state-image"/>
    <field name="entryStatusCode">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="ENTRY_STATUS_CODE"/>
    </extension>
    </field>
    <field name="entryStatusId" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="ENTRY_STATUS_ID"/>
    </extension>
    </field>
    <field name="entryStatusLs">
    <collection element-type="EntryStatusL"/>
    <extension vendor-name="kodo" key="inverse-owner"
    value="entryStatus"/>
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-many">
    <extension vendor-name="kodo"
    key="ref-column.ENTRY_STATUS_ID" value="ID"/>
    <extension vendor-name="kodo" key="table"
    value="TRAVELER.ENTRY_STATUS_L"/>
    </extension>
    </field>
    <field name="entryStatusName" persistence-modifier="none">
    </field>
    <field name="modificationDate">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="MODIFICATION_DATE"/>
    </extension>
    </field>
    <field name="modificationUserId">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="MODIFICATION_USER_ID"/>
    </extension>
    </field>
    <field name="owner">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="OWNER"/>
    </extension>
    </field>
    <field name="visible">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="VISIBLE"/>
    </extension>
    </field>
    </class>
    </package>
    </jdo>
    EntryStatusl.jdo
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="gov.state.pisces.jdo">
    <class name="EntryStatusL" identity-type="application"
    persistence-capable-superclass="EntryStatus">
    <extension vendor-name="kodo" key="jdbc-class-map" value="vertical">
    <extension vendor-name="kodo"
    key="ref-column.ENTRY_STATUS_ID" value="ID"/>
    <extension vendor-name="kodo" key="table"
    value="TRAVELER.ENTRY_STATUS_L"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="state-image"/>
    <field name="entryStatus">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-one">
    <extension vendor-name="kodo"
    key="column.ENTRY_STATUS_ID" value="ID"/>
    </extension>
    </field>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column" value="ID"/>
    </extension>
    </field>
    <field name="language">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-one">
    <extension vendor-name="kodo" key="column.LANGUAGE_ID"
    value="LANGUAGE_ID"/>
    </extension>
    </field>
    <field name="languageId" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="LANGUAGE_ID"/>
    </extension>
    </field>
    <field name="modificationDate">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="MODIFICATION_DATE"/>
    </extension>
    </field>
    <field name="modificationUserId">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="MODIFICATION_USER_ID"/>
    </extension>
    </field>
    <field name="name">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="NAME"/>
    </extension>
    </field>
    <field name="owner">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="OWNER"/>
    </extension>
    </field>
    </class>
    </package>
    </jdo>
    descriptions of tables
    PMAN@pisces > desc traveler.entry_status
    Name Null? Type
    ENTRY_STATUS_ID NOT NULL NUMBER(35)
    ENTRY_STATUS_CODE NOT NULL VARCHAR2(3 CHAR)
    LEGACY_NAME VARCHAR2(50 CHAR)
    VISIBLE NOT NULL NUMBER(1)
    MODIFICATION_DATE NOT NULL DATE
    MODIFICATION_USER_ID NOT NULL VARCHAR2(20 CHAR)
    OWNER NOT NULL NUMBER(35)
    PMAN@pisces > desc traveler.entry_status_l
    Name Null? Type
    ID NOT NULL NUMBER(35)
    LANGUAGE_ID NOT NULL NUMBER(35)
    NAME NOT NULL VARCHAR2(255 CHAR)
    MODIFICATION_DATE NOT NULL DATE
    MODIFICATION_USER_ID NOT NULL VARCHAR2(20 CHAR)
    OWNER NOT NULL NUMBER(35)

  • Map Legend changes when scrolling map vertically

    With the map scrolled all the way out, when you move it vertically it, the legend changes
    With map in middle. 5000km:5000miles
    with map lying on bottom of screen 5000km:2000miles
    with half of map scrolled out of the screen 200km:100miles
    with map out of screen 10km:5 miles

    Yes. Old Mercator will mess you up everytime.
    On the maps that only cover a small area, the scale makes sense, but on the map of the whole world, the scale is non-linear and not the same in all directions, so you can't use it for much.
    Hal

  • Mapping vertical arrays versus horizontal arrays in HP exstream

    Anyone with details on mapping vertical arrays versus horizontal arrays in HP Streak software please?

    johnsold wrote:
    Is this a bug (inconsistent behavior)? A feature? An unintended consequence of something else?
    I agree, this looks inconsistent.
    Ranjeet_Singh wrote:
    Make the index of both the array 0 then run your program. 
    Now horizontal array shows 4th element & vertical array shows 10th element. 
    What are you trying to say here? You are just repeating the instruction #1 on the front panel of the posted VI, then repeating what the image above already shows.
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for