Hi Armin

> 
> yep, this is the intended behavior. This method (beside user specific
> ManageableCollection implementations) only allow base collection
> classes
> (List, Set,...).
> The mentioned line is similar to:
> Set.class.equals(fieldClass)

Okay, if this is intended. 
It was just a stumbling block.
I will look if I can change our code with backward compatibility.
 

>
> You are right, this should not happen. In the OJB test-suite we do
> several tests using table-per-subclass inheritance and this never
> happens.
> Could you post the mapping for class A1, A0 and the source of the
query
> then I can try to reproduce your issue.

The criteria for this issue was build by using the table column name
'PHB_USRID'.
After I changed this to 'addIsNull("m_iUserId") the query succeeded.

Here is some code:

public static Collection getPublic() 
{
    Criteria criteria = new Criteria();
    criteria.addColumnIsNull("PHB_USRID");

    PersistenceBroker broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
    QueryByCriteria query = new QueryByCriteria(A1.class, criteria);
    query.setDistinct(bDistinct);

    return broker.getCollectionByQuery(query);
}

/**
 *
 * @ojb.class table="A1"
 */
public class A1 {
    /**
     * @ojb.field column="PHB_ID"
     * primarykey="true"
     * autoincrement="ojb"
     * id="1"
     */
    protected Integer m_iId;

    /**
     * @ojb.field column="PHB_NAME"
     * jdbc-type="VARCHAR"
     * length="50"
     */
    protected String m_sName;

    /**
     * @ojb.field column="PHB_USRID"
     */
    protected Integer m_iUserId;
}

/**
 * @ojb.class table="A0"
 * include-inherited="false"
 * @ojb.field column="PHB_ID"
 * primarykey="true"
 * name="m_iId"
 * jdbc-type="INTEGER"
 * @ojb.reference class-ref="A1"
 * auto-retrieve="true"
 * auto-update="true"
 * auto-delete="true"
 * foreignkey="m_iId"
 */
public class A0 extends A1
{
    /**
     * @ojb.field column="PHB_CSV"
     * jdbc-type="VARCHAR"
     * length="255"
     */
    protected String csv;
}


I hope it is enough, because I can't post pure company code.

Regards,
Sascha Broich


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to