db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justis Peters <jus...@oculan.com>
Subject Re: Accessing other tables.
Date Fri, 03 Oct 2003 17:34:45 GMT
Hi Denis,

Can you send us your repository_user.xml, the bean class, and the snippet of code that accesses
it?  One problem I encountered when I first started using OJB is that using a QueryByCriteria
does not work how you would expect if you have any java primitive types (like int) in your
bean.  Since the default value for int is 0, using "new QueryByCriteria(example)" results
in a search where all your int fields match 0.

You can alternately use QueryByIdentity or you can change your bean to use "Integer" instead
of "int".  I prefer using Integer where possible, because it allows me to actually differentiate
between a null value and a 0 value.

If this is not the problem, please send us the info you request above.  Good luck with your
data migration!

Sincerely,
Justis Peters

denis@betterway.net [denis@betterway.net] wrote:
> Hello,
> 
> I am trying to get some data into my OJB enabled app from a pure SQL app.
> I've set up an intermediary table and I can store data in it fine, but when
> I try to get the data from the table into my OJB enabled app (even though
> i've set up a bean for the table in OJB) I get a null object back.
> 
> Any way to accomplish this?  I really cannot add OJB to my other
> application, I am tight on time.
> 
> Thank you
> 
> Denis
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Mime
View raw message