Re: How to set null for a column for which the corresponding java type is long

2004-01-28 Thread Danilo Tommasina
Hi, Do not use a primitive data type in your persistent class, use instead a subtype of Number. (Integer, Long, BigInteger, BigDecimal,... ) cheers Danilo Hi, All I have a data base column. The data type is number (10). It is nullable. The JDBC type defined in repository is BIGINT and the

Using VerifyMappingTask

2004-01-28 Thread Tino Schöllhorn
Hi, I want to automatically check the integrity of the repository.xml file and the corresponding database-mapping. So I tried out the VerifyMappingTask which is includes in the OJB-distribution (I am using rc5). But I am having problems with the classpath. Here is the situation: - My

Re: How to set null for a column for which the corresponding java type is long

2004-01-28 Thread Andrei Ivanov
But isn't that much slower? /me is a newbie in java and ojb On Wed, 28 Jan 2004, Danilo Tommasina wrote: Hi, Do not use a primitive data type in your persistent class, use instead a subtype of Number. (Integer, Long, BigInteger, BigDecimal,... ) cheers Danilo Hi, All I

Re: How to set null for a column for which the corresponding java type is long

2004-01-28 Thread Martin Kalén
Danilo Tommasina wrote: I have a data base column. The data type is number (10). It is nullable. The JDBC type defined in repository is BIGINT and the corresponding java type is long (default). Can anybody tell me how to save a record so that the value of that column is null instead of zero? Do

Re: Performance difference between mapping number column to long vs BigDecimal

2004-01-28 Thread Martin Kalén
ZZZ Liu wrote: I am trying to know the performance difference between mapping number column to long vs BigDecimal. I did following test. Just as a side note and not a direct answer to your question: the OJB performance will be very dependent on the RDBMS performance, especially when running

Re: Using VerifyMappingTask

2004-01-28 Thread Thomas Dudziak
First, you can always invoke ant with the -v option for more information (or even -debug for usually way too much information). Second, I see in the source of the verify task that the classpath option of the task is called 'verifyClassPath' whereas you have 'verifyclasspath' (note the lowercase).

1:n relationships excessive database calls

2004-01-28 Thread Rick Banerjee
Hi, Here's the situation I am faced with.Could anybody analyze the situation and tell me which way to go on this? We have a Person valueobject mapped to a Person table in the database. We have an Application valueobject mapped to the Application table in the database. In the Person

Re: More elements : Problem using getCollectionByQuery

2004-01-28 Thread Oleg Nitz
Hi Andre, I guess the problem is: the collection returned by getCollectionByQuery() contains dynamic proxies, not MGT_Requests. So you should cast to an interface that MGT_Request should implement if you want to use dynamic proxies (does it?), see

RE: WebSphere Site Developer Test Env with P6Spy

2004-01-28 Thread Göschl,Siegfried
Hi Jay, for IDE debugging with WSAD I'm not using a Datasource but a JDBC connection because in the case of the datasource you have to set up the datasource for each developer box manually Cheers, Siegfried Goeschl -Original Message- From: Jay Xu [mailto:[EMAIL PROTECTED] Sent:

Re: Using VerifyMappingTask

2004-01-28 Thread Tino Schöllhorn
Hi Thomas, thanks for your answer. I checked again, but still I get a NoClassDefFoundError. Unfortuanately there is not stacktrace so it is quite difficult to find it. The class kos.generator.DataObject is located in the ojb-generator.jar file. This jar is correct because I am using this JAR

Re: More elements : Problem using getCollectionByQuery

2004-01-28 Thread A Leg
Oleg Thanks very much for your help. I better understand now. In fact I did'nt want particulary use dynmic proxy. I put it because I look at some examples to create my repository file (I am quite lasy!) Effectively, with my workaround it works good. I will look at the tutorial3 to understand

Re: I found a problem(it is maybe a bug)

2004-01-28 Thread Jakob Braeuchi
hi dogie, i can't see the difference between the two mappings except the sequence of the definition of the IA-classes :( do you have an sql trace to show the different behaviour ? jakob wrote: Hi! Armin I found if a class implement 2 interface, another class referance a interface

Re: Using VerifyMappingTask

2004-01-28 Thread Thomas Dudziak
On Wed, 28 Jan 2004, [ISO-8859-1] Tino Schöllhorn wrote: Hi Thomas, thanks for your answer. I checked again, but still I get a NoClassDefFoundError. Unfortuanately there is not stacktrace so it is quite difficult to find it. The class kos.generator.DataObject is located in the

Re: More elements : Problem using getCollectionByQuery

2004-01-28 Thread Oleg Nitz
On Wednesday 28 January 2004 17:01, A Leg wrote: Thanks very much for your help. I better understand now. In fact I did'nt want particulary use dynmic proxy. I put it because I look at some examples to create my repository file (I am quite lasy!) Effectively, with my workaround it works good.

Re: More elements : Problem using getCollectionByQuery

2004-01-28 Thread Andy Malakov
Another question : I just start to use autoincrement with sequence manager. It works good. Is it any way to get directly the value affected by the sequence manager ? Not sure what exactly are you asking for. Can you please rephrase your question?

Closing ODMG JDBC Connection

2004-01-28 Thread Coup, Robert Muir
Hi All, We're using a hsqldb database for part of our application, and need to package the database files up into a zip archive before exiting. Problem is, OJB doesn't seem to be closing the database connection so the files are still locked and we can't delete them once they are in the Zip file.

RE: Closing ODMG JDBC Connection

2004-01-28 Thread Lance Eason
Not closing the connection is kind of the whole point of connection pooling, and OJB provides connection pooling. Database connections are typically expensive to establish, so rather than each time you use the database creating a new connection and then releasing it at the end connections are

Re: Using VerifyMappingTask

2004-01-28 Thread Thomas Dudziak
I've changed the verify ant task so that it now accepts a classpath sub-tag instead of the verifyClassPath attribute. Check the build.xml in CVS to see how its used. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For

properly way to lookup a java.sql.Connection from the connection pool

2004-01-28 Thread Christopher Tava
dear ojb user group, could you kindly tell me the properly way to look a connection from the connection pool? i have used the following call, but i get a socked closed exception. Connection conn = pBroker.serviceConnectionManager().getConnection(); 2004-01-27 10:45:46,609 [RMI TCP

RE: Closing ODMG JDBC Connection

2004-01-28 Thread Coup, Robert Muir
Hi Lance, Pools are great and I don't really want to get rid of that by using ConnectionFactoryNotPooledImpl. However, I found part of the answer. Each of the ConnectionFactory's has a releaseAllResources method which will close all the connections in the pool (exactly what I want). Anyway,

Re: Do I need to create reference objects when storing object?

2004-01-28 Thread Armin Waibel
Hi, In the previous versions of OJB it wasnt necessary to create reference object when storing object that has reference but when I try the same thing with OJB 1.0 RC5 the FK fields are set by OJB to null. Is creating the reference object the right thing to do or is there some way to

Re: I found a problem(it is maybe a bug)

2004-01-28 Thread
OK!! Uppers of the two mappings, IA1 is declared first. The other one ,IA2 is declared first. - Original Message - From: Jakob Braeuchi [EMAIL PROTECTED] To: OJB Users List [EMAIL PROTECTED] Sent: Thursday, January 29, 2004 2:17 AM Subject: Re: I found a problem(it is maybe a

Can anyone help me with this Join question?

2004-01-28 Thread Jay Xu
I am using OJB to do a simple 1:1 mapping and would like to create a Join between these two tables. The OJB works and I got all database fields I want. But instead of creating a Join, OJB creates TWO SQL statement. From P6Spy, 1075339115137|571|0|statement|SELECT

Easy question

2004-01-28 Thread Anthony Carlos
I read the page on queries: http://db.apache.org/ojb/query.html#report I noticed two kinds of queries. First, a QueryByCriteria: Query q = QueryFactory.newQuery(Person.class, crit); And second, a ReportQueryByCriteria: ReportQueryByCriteria q = QueryFactory.newReportQuery(ProductGroup.class,