newQuery or newReportQuery???

2004-03-25 Thread Just Fun 4 You
Hi, I am new to OJB and wondering when I should use QueryFactory.newQuery() and QueryFactory.newReportQuery(). May be this answers my second question: how to select specific attributes in a query so that not all attributes are considered (e.g. which I am not interested in)? Thank you for your he

RE: Primary Key from Insert

2004-03-25 Thread Glenn Barnard
I'm dead in the water. Can't get the PK query to return anything. Am at wits end as all my development efforts are dependent on this working. No further responses from the OJB guys leading me to try something else. From: "McCaffrey, John G." <[EMAIL PROTECTED]> To: 'Glenn Barnard' <[EMAIL PROT

RE: Loss of precsion with PersistenceBroker.store() and BigDecima l on Sybase.

2004-03-25 Thread Stuart Heriot
I have implemented a fix for this issue locally by modifying the Sybase Plaform dependant class (see below). I picked this up from a posting about a similar issue with DB2. The DB2 fix, however, is not in the rc5 release. We need a fix to be included in the official OJB release so that we don't rei

Multiple ODMG Databases open concurrently

2004-03-25 Thread Coup, Robert Muir
Hi all, Situation: We use a single data/db model which can either be an online network database (PGSql) or an offline local one (HSQLDB). At startup time, the user chooses which to use, and we just apply a different connection-descriptor. That all works great. Now one feature requires a connecti

Loss of precsion with PersistenceBroker.store() and BigDecimal on Sybase.

2004-03-25 Thread Stuart Heriot
Hi, We have come across a problem storing BigDecimals with values being truncated and all decimal places being set to zero. Our system has a number of value types stored with 2, 4 or 6 decimal point precision. We are using BigDecimals rather than floats or doubles to maintain accuracy in financia

OQL Query by date

2004-03-25 Thread Angus Berry
(rc5) >From everything I've read I think this should work. I'm trying to select an object by it's id & date: query.create("select invoice from " + InvoiceBO.class.getName() + " where invoiceID = $1 and date = $2"); Before I even get to bind the query values (query.bind(invNum)), I get an error sa

Re: MtoNCollectionPrefetcher.buildPrefetchCriteriaMultipleKeys(MtoNCollectionPrefetcher.java:338)

2004-03-25 Thread Edson Carlos Ericksson Richter
Thinking less abstract, the field names of PK in A object are same field names in B table, as the field names of PK in C are the same field names in B. So, if A has the fields A1, A2 (PKs), and C has fields C1, C2, C3 (PKs), then B has fields A1, A2, C1, C2, C3. So, the select will be: select

Re: MtoNCollectionPrefetcher.buildPrefetchCriteriaMultipleKeys(MtoNCollectionPrefetcher.java:338)

2004-03-25 Thread Edson Carlos Ericksson Richter
The expected result is something like A<->B<->C Where A is M side has PK with 2 fields, C is N side has PK with 3 fields, B is indirection table, and has 5 fields. select * from A join B on A.field1 = B.field1 and A.field2 = B.field2 join C on C.field1 = B.field3 and C.field2 = B.field4 and C

Re: MtoNCollectionPrefetcher.buildPrefetchCriteriaMultipleKeys(MtoNCollectionPrefetcher.java:338)

2004-03-25 Thread Jakob Braeuchi
hi edson, imo the whole handling of the multi-key criteria is a little bit weird. what should the sql look like in your case ? jakob Edson Carlos Ericksson Richter wrote: Hum... There is some instability here. I don't know what combination of dynamic proxies/collection proxies is causing this bu

Re: Mapping two classes two one table

2004-03-25 Thread Edson Carlos Ericksson Richter
The result of a report query is a Object [], where each element represents a row from the database, and is a Object[] (one value for each field returned). Best regards, Edson Richter Guido Beutler wrote: Hi jakob, Thanks for the fast reply! works fine but one shot question: How do I get the

Re: Mapping two classes two one table

2004-03-25 Thread Guido Beutler
Hi jakob, Thanks for the fast reply! works fine but one shot question: How do I get the values (colums) from the object ? At the test cases I found only asserts on the size of the collection. Of course I would like to get the values. Thanks in Advance!! best regards, Guido Jakob Braeuchi wrot

Re: Mapping two classes two one table

2004-03-25 Thread Jakob Braeuchi
hi guido, use a report-query to retrieve the pks only. hth jakob Guido Beutler wrote: Hi, I've got a small problem. I have a table with many columns. I would like to select only the primary key field with a complex select first. It's like a candidate list. From that I can find the correct valu

Mapping two classes two one table

2004-03-25 Thread Guido Beutler
Hi, I've got a small problem. I have a table with many columns. I would like to select only the primary key field with a complex select first. It's like a candidate list. From that I can find the correct value (independen from the database). For the correct value I would like to receive all data

Re: Insertion semantics

2004-03-25 Thread Laurie Harper
Armin Waibel wrote: Hi Laurie, I will try to do my best to shed some light on this. Thanks for the response Armin :) First do remove all access="anonymous" setting from your descriptors (expect those for 1:1 relations) to eliminate side-effects of this setting. It shouldn't have any effect on th

reference (1:1) and null

2004-03-25 Thread Edson Carlos Ericksson Richter
Hi! When retrieving a 1:1..0 mapping using proxies, after counting how many values has in the table, OJB should set the referenced object to NULL when counting is 0 (not setting the reference for a proxy that will give a NPE when trying to call a method). If the value set is a proxy (event if

Re: 1.0 RemovalAware doesnt work (was 1.0 - one more bug)

2004-03-25 Thread Edson Carlos Ericksson Richter
Appear that this code is missed from 1.0 CVS HEAD: // invoke callback on collection if (col instanceof ManageableCollection) { ((ManageableCollection) col).afterStore(this); } in PersistenceBrokerImp

Re: 1.0 RemovalAware doesnt work (was 1.0 - one more bug)

2004-03-25 Thread Edson Carlos Ericksson Richter
I tracked down to the call to fireBrokerEvent just after calling store(myObject). When the call to afterStore in my RemovalAwareList should be called? Thanks Edson Richter Edson Carlos Ericksson Richter wrote: Someone know what happened to the afterstore methods??? Thaks, Edson Richter Eds

Re: 1.0 - one more bug

2004-03-25 Thread Edson Carlos Ericksson Richter
Someone know what happened to the afterstore methods??? Thaks, Edson Richter Edson Carlos Ericksson Richter wrote: Ops, the correct is "The afterstore method is NOT being called". Tkx, Edson Richter - Original Message - From: "Edson Carlos Ericksson Richter" <[EMAIL PROTECTED]> To: "'

Re: Building OJB using maven

2004-03-25 Thread alain . perry
Hi Leandro, I'm afraid you're right : maven build should not be supported yet by OJB ! By the way, Joe Germuska gave another idea (thanks Joe every idea is good to study) but I don't trust any change in a jar file name to force it to a convenient one. So, I will use ant build. Thanks a lot.

Re: Building OJB with no GUI

2004-03-25 Thread Stephan Michels
Am Do, den 25.03.2004 schrieb [EMAIL PROTECTED] um 11:19: > Is there a way of building OJB wihtout a GUI? If not, can we please have > one? > > I am trying to build OJB over a telnet connection. It fails becuase it > cannot open > the splash screen with its progress bar back to my workstation. Ye

Re: Building OJB with no GUI

2004-03-25 Thread Edson Carlos Ericksson Richter
I think you can remove the spash tag in build.xml file. Richter - Original Message - From: <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Thursday, March 25, 2004 7:19 AM Subject: Building OJB with no GUI Is there a way of building OJB wihtout a GUI? If not, can we

Building OJB with no GUI

2004-03-25 Thread raphael . x . mankin
Is there a way of building OJB wihtout a GUI? If not, can we please have one? I am trying to build OJB over a telnet connection. It fails becuase it cannot open the splash screen with its progress bar back to my workstation. -

Re: Back to square 1

2004-03-25 Thread Armin Waibel
Hi Steve, I have written an test case without using an anonymous field for 1:n FK field (recommend anonymous key only for 1:1 relations). // object gat already exists CollectibleC child = new CollectibleC(prefix, null, "a new CollectibleC"); tx.begin(); tx.lock(gat, Transaction.WRITE); tx.lock(c

Re: Insertion semantics

2004-03-25 Thread Armin Waibel
Hi Laurie, I will try to do my best to shed some light on this. First do remove all access="anonymous" setting from your descriptors (expect those for 1:1 relations) to eliminate side-effects of this setting. > First, the insertion of player1 fails, as it should. But I expected it > to fail on t