Hi,
Im using, db-obj-1.0.3.jar
metadata mapping:
<class-descriptor class="AdvertisementType" table="ADVERTISEMENTTYPE">
<field-descriptor
name="id"
column="ID"
jdbc-type="BIGINT"
nullable="false"
primarykey="true"
autoincrement="true"/>
<field-descriptor name="name" nullable="false" column="NAME"
jdbc-type="VARCHAR"/>
</class-descriptor>
In your previous post you said "mysql db with autoincrement the
database", so does it mean you are using database identity columns (and
SequenceManagerNativeImpl) or do you use sequence id's generated by OJB
(e.g. SequenceManagerHighLowImpl)?
Generated sql
SQL:SELECT A0.ID,A0.NAME FROM ADVERTISEMENTTYPE A0 ORDER BY 1
However, noticed now that im using, the deprecated method
crit.addOrderBy(orderBy, sortAscending); Could that be the problem?
I don't think so.
regards,
Armin
Strange that it works for other objects with exact same fields and
metadata mappings, the AdvertisementType used to be named only Type,
changed it for possible collitions...
thanks,
christian vejrich.
-----Ursprungligt meddelande-----
Från: Armin Waibel [mailto:[EMAIL PROTECTED]
Skickat: den 17 januari 2006 10:57
Till: OJB Users List
Ämne: Re: possible newbie Question; Wrong Long id when fetching..
Hi Christian,
Christian Vejrich wrote:
When inserting a new object, mysql db with autoincrement the database
stores the object correct and sets an correct id, but when fetching all
the stored objects( ojb does a select *) , the ids in the objects
returned from ojb are completly different ones? Any ideas?
Could you please post more details. Version of OJB? Code snippet,
metadata mapping? Generated sql, expected sql,....
regards,
Armin
thanks,
-c.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]