Re: AW: AW: Two 1:N mappings to one table

2004-01-14 Thread Brian McCallister
Hmm, fun one. I suspect you may have run into the weird edge case. I don't have an immediate answer on this -- need to play and dig. Anyone else hit this before? Any chance you can create a unit test that demonstrates the behavior? If so send it to me and I'll check it in and dig in (or start p

RE: Ordered Collections, Lists, DList

2004-01-14 Thread Coup, Robert Muir
If anyone is interested, my current solution for one case is: 1. add an Integer field listIndex to the item object 2. make the item object PersistenceBrokerAware, and in the beforeUpdate() method // update the position of this entry in the list if (this.parent != null) {

RE: Qualified Collection Relationships

2004-01-14 Thread Coup, Robert Muir
Hi, One problem solved - one to go. GO is a group. A group has a collection of members (which is a superclass of group), and has a collection of all groups that contain it, and has a reference to RO. RO + GO + MO + MO + MO + MO + MO + GO In retrieving

RE: TimeStamp & Error Codes

2004-01-14 Thread Guillaume Nodet
Considering your mail, i'm not sure you have completely understood what OJB is for. What do you want to use it for ? -Message d'origine- De : Gopi Nandamuri [mailto:[EMAIL PROTECTED] Envoye : mercredi 14 janvier 2004 16:34 A : OJB Users List Objet : RE: TimeStamp & Error Codes Hi All,

RE: Qualified Collection Relationships

2004-01-14 Thread Coup, Robert Muir
Hi Jakob, > you can solve this problem by using a QueryCustomizer to add > additional criteria > to the query generated by ojb. I found it! It's only mentioned in the O/R mapping tutorial but not is missing completely from the repository documentation, so I had missed it. I think it would be h

Re: Safe to mix ODMG and PB?

2004-01-14 Thread Armin Waibel
Hi Sean, recommended to use the second alternative. We introduced a TransactionExt interface in rc5, this encapsulates the proprietary extensions of odmg.Transaction. Thus you can cast tx to TransactionExt too. > Transaction tx = odmg.newTransaction(); > tx.begin(); > PersistenceBroker broker =

Re: Proxy prefetching limit in Collection and Reference descriptors.

2004-01-14 Thread Jakob Braeuchi
hi tadeus, this limit is defined in ojb.properties. the parameter is called SqlInLimit. hth jakob Tadeus Garsva wrote: Hi, I don't find any reference to method setProxyPrefetchungLimit in ObjectReferenceDescriptor class. Does it mean that proxy-prefetching-attribute in reference and collectio

Re: Qualified Collection Relationships

2004-01-14 Thread Jakob Braeuchi
hi robert, you can solve this problem by using a QueryCustomizer to add additional criteria to the query generated by ojb. hth jakob Coup, Robert Muir wrote: Hi All, What I have : Root Object RO has: - a collection of CO objects specified using Child Object CO has: - a collection of CO obje

AW: AW: Two 1:N mappings to one table

2004-01-14 Thread Dirk Manske (Service Respond)
Hi Brian, exactly. Due to copy & paste I assigned a wrong column to the attribute activityId in class Person. But know I experience the problem, that each created activity is stored twice (with different id's). I mean, I know why, I add activity once to the 'person collection' and to the 'venture

Safe to mix ODMG and PB?

2004-01-14 Thread Sean Dockery
If my application is using the ODMG personality of OJB a la... Implementation odmg = OBJ.getInstance(); ... Is it safe for other parts of my code to use a PersistenceBroker like this... PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker(); try { // ... } finally {

Re: AW: Two 1:N mappings to one table

2004-01-14 Thread Brian McCallister
It sounds like there is actually a problem in the mapping from class -> table where the activityId is listed. Any chance you could post the full mapping for these classes, along with the database schema? -Brian On Jan 14, 2004, at 11:33 AM, Dirk Manske (Service Respond) wrote: Hi, yes, i am

Date problem ?

2004-01-14 Thread eric barbe
Hi everybody, I'm working under Oracle 8i. In my repository_user.xml, i have amongst other things this class descriptor where the Calendate2DateFieldConversion looks like following : /* * Created on 19 nov. 2003 * * To change the template for this generated file go to * Windo

AW: Two 1:N mappings to one table

2004-01-14 Thread Dirk Manske (Service Respond)
Hi, yes, i am using pb. Setting auto-retrieve="true" in the collection-descriptor has not the desired effect, I still get the following two strange error messages: within browser it shows a null pointer execption for Venture when it tried to retrieve all venture objects associated with activity

RE: TimeStamp & Error Codes

2004-01-14 Thread Gopi Nandamuri
Hi All, Can anyone reply to my message? In question 1 I have wrongly mentioned time in Nano seconds but I am looking up to microseconds. Using JavaDate2SqlTimestampFieldConversion class I am able to convert java.util.Date to TimeStamp, but in microseconds it is moving zeroes. I am using IBMW

Re: Two 1:N mappings to one table

2004-01-14 Thread Brian McCallister
Mapping to 1:N's to the same table is fine, heack mapping 1:N's form one class to itself multiple times works fine. From looking at your configs I will venture that you are using the PB API and one of the collections isn't loading -- try setting auto-retrieve on the collections, or (these are e

RE: Batch mode and foreign keys

2004-01-14 Thread Guillaume Nodet
Thanks a lot ! It works perfectly now. Guillaume -Message d'origine- De : Oleg Nitz [mailto:[EMAIL PROTECTED] Envoyé : mercredi 14 janvier 2004 01:29 À : OJB Users List Objet : Re: Batch mode and foreign keys Guillaume, can you try now, with CVS version? Thanks, Oleg On Tuesday 13 Ja

RE: CVS access

2004-01-14 Thread "Göschl,Siegfried"
Hi Guillaume, are you behind a firewall?! Siegfried Goeschl -Original Message- From: Guillaume Nodet [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 11:48 AM To: OJB Users List Subject: CVS access I'm trying to access the cvs server, but i can not figure how to login in. I

Re: Could not borrow connection from pool

2004-01-14 Thread Pedro Salgado
I think I have found the problem... I was creating multiple new PersistenceBroker instances. Eventually this makes it run out of connections. Now I share the same PB instance for severall classes. sorry, Pedro Salgado On 14/01/2004 10:34, "Pedro Salgado" <[EMAIL PROTECTED]> wrote: > > Can

Re[2]: Batch mode and foreign keys

2004-01-14 Thread Oleg Nitz
Hi Guillaume, You may download the source distro from http://db.apache.org/builds/ojb/1.0.rc5/ and get the BatchConnection.java file via web CVS http://cvs.apache.org/viewcvs.cgi/db-ojb/src/java/org/apache/ojb/broker/util/batch/BatchConnection.java (click 'download' by right mouse button and choo

Proxy prefetching limit in Collection and Reference descriptors.

2004-01-14 Thread Tadeus Garsva
Hi, I don't find any reference to method setProxyPrefetchungLimit in ObjectReferenceDescriptor class. Does it mean that proxy-prefetching-attribute in reference and collection descriptor can be changed only by calling this method and not by attribute in repository.xml? Thanks in advance for a

RE : Could not borrow connection from pool

2004-01-14 Thread Emmanuel DUPONT
You open transaction without close. You reach the maxBroker number indicated in the Ojb.properties -Message d'origine- De : Pedro Salgado [mailto:[EMAIL PROTECTED] Envoyé : mercredi 14 janvier 2004 11:34 À : OJB Users List Objet : Could not borrow connection from pool Can anyone desc

Could not borrow connection from pool

2004-01-14 Thread Pedro Salgado
Can anyone describe me what is happening? The connection pool is out of connections? javax.servlet.ServletException: Could not borrow connection from pool - org.apache.ojb.broker.metadata.JdbcConnectionDescriptor: [EMAIL PROTECTED] jcd-alias=default default-connection=true dbms=MySQL j

TimeStamp & Error Codes

2004-01-14 Thread Gopi Nandamuri
Hi, 1) I am new to OJB and Testing OJB with various options to suit my database. I have a TimeStamp field in my table and I would like to enter the exact time (In Nano Seconds) when I call the Store method in broker. In SQL we used to do like this insert into table values (TIMESTAMP,...). Is t

CVS access

2004-01-14 Thread Guillaume Nodet
I'm trying to access the cvs server, but i can not figure how to login in. I tried the following using 'anoncvs' as password: $ cvs login Logging in to :pserver:[EMAIL PROTECTED]:2401/home/cvspublic CVS password: cvs [login aborted]: connect to cvs.apache.org(209.237.227.194):2401 failed: Connecti

Re: AXgen and OJB and DDL

2004-01-14 Thread Peter Wieland
> > > > > Can you explain why they are there? Is there any part of OJB that would > make use of them? I can see that (if there was an option in AXgen for > it) the lockTimestamp field could be used for optimistic locking, but > the other fields appear to be specific to some other use expecte

Problem in PBCollectionProxyListener during CollectionProxy prefetching

2004-01-14 Thread Tadeus Garsva
Hi, I have a Class A with 1:n relation to Class B. Collection descriptor is with proxy=true. Collection of class A have more objects than prefetching limit. During prefetching of class B I got ClassCastException in PBCollectionProxyListener in method : protected void addThisListenerTo(Object

RE: Batch mode and foreign keys

2004-01-14 Thread Guillaume Nodet
I can not log on the cvs server. What are the right things to do that ? Guillaume -Message d'origine- De : Oleg Nitz [mailto:[EMAIL PROTECTED] Envoyé : mercredi 14 janvier 2004 01:29 À : OJB Users List Objet : Re: Batch mode and foreign keys Guillaume, can you try now, with CVS version?

RE: Cache Mechanism

2004-01-14 Thread Coup, Robert Muir
As I understand it OQL queries always hit the database but the objects can be resolved from the cache though. If you use the PB API for accessing objects (you can do this from ODMG) then the cache is accessed much more. Good Luck, Rob :) -Original Message- From: Ronen Yaari [mailto:[EMAI

RE: Cache Mechanism

2004-01-14 Thread Ronen Yaari
My problem is that when working with the ODMG API with cache definition I spoted that when making the same call twice it in both cases goes to the database in order to fetch the data. To ensure it: before making the second call I deleted the relveant row from the database and it did not succed