Hi everybody,
after playing around with the PB-API for a while, I started trying
the
ODMG-API today. But I have some difficulties with the OQL and
there aren't
much information on the odmg.org site. :(
I have two entries in my db-table, the BEN_IDs are "LAMBREC" and
"AAAAAAA"
but with the query below I still get both, no matter what I enter
as benId
in the query. What am I doing wrong?
Another question that came up is the sense of the 'asdf' in the
select
query. What can it be used for?
Here is what I do:
Transaction tx = odmg.newTransaction();
tx.begin();
OQLQuery oQuery = odmg.newOQLQuery();
oQuery.create("select asdf from " +
VproviZulBen.class.getName() + " where benId = LAMBREC");
List all = (List) oQuery.execute();
tx.commit();
The xml-def is:
<class-descriptor class="VproviZulBen" table
="LSVERFT.VPROVI_ZUL_BEN">
<field-descriptor id="1" name="benNr" column="BEN_NR"
jdbc-type="INTEGER" primarykey="true" access = "readwrite"
autoincrement="false"/>
<field-descriptor id="2" name="benId" column="BEN_ID"
jdbc-type="CHAR" primarykey="false" access = "readwrite"
autoincrement="false"/>
<collection-descriptor name="vproviGrpZuord"
element-class-ref="VproviGrpZuord" auto-retrieve="true"
auto-update="false" auto-delete="false" proxy="true">
<inverse-foreignkey field-ref="benNr"/>
</collection-descriptor>
</class-descriptor>
Table definition (just in case...):
CREATE TABLE LSVERFT.TPROVI_ZUL_BEN
(BEN_NR INTEGER NOT NULL,
BEN_ID CHAR(8) NOT NULL
)
Thanks a lot
Lasse
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]