Re: Probleml with Mapping Inheritance Hierarchies

2004-03-31 Thread Jakob Braeuchi
hi edson, the Identity uses pk only. so you'd have to declare ojbConcreteClass part of the pk. jakob Edson Carlos Ericksson Richter wrote: I did it diferencing them by the class name (I put the ojbConcreteClass - I know this is not really needed, but I think any identifier is ok). So, there is

Re: Foreign key lookups

2004-03-31 Thread Laurie Harper
Ah, so this is unsupported currently. Yeah, I see the dilemma; it would get particularly thorny if the object in the relation had a composite primary key. I just wish I had a decent reference to OQL so I'd know what it could do! I'm looking forward to switching to JDO when OJB 2.0 hits :-) L.

Re: AbstractPersistentField Question

2004-03-31 Thread Thomas Dudziak
I've tried your classes and descriptor, and I've found one problem which is concerned with the initialization of the nested field. To be more precise, when reading an object from the database, OJB must create the nested field (child in your case, e.g. setChild/getChild when using IProduct). In orde

Re: Probleml with Mapping Inheritance Hierarchies

2004-03-31 Thread Edson Carlos Ericksson Richter
I did it diferencing them by the class name (I put the ojbConcreteClass - I know this is not really needed, but I think any identifier is ok). So, there is no chance to OJB identify (by the complete class name) that the classes are not same for same PK id, and then use correct class-descriptor a

Re: [question] rc4 to rc6, fullSize method deprecated, and not functi onal

2004-03-31 Thread Jakob Braeuchi
hi roger, dou you use getCollectionByQuery or getIteratorByQuery ? the iterator returned by the latter can be casted to OjbIterator. jakob Janssen, Roger wrote: Hi, I'm trying to migrate from rc4 to rc6. I noticed that the fullSize method on query in rc6 always returns 0. Because of this i n

Re: Transaction question

2004-03-31 Thread Armin Waibel
Hi, Leandro Augusto de Almeida wrote: Hi Armin, I put the broker.beginTransaction() and broker.commitTransaction() only for test, because I was getting the same exception on broker.close() and now on broker.commit() (because commit closes the con...). Using the old datasource (not XA) this works

Re: Probleml with Mapping Inheritance Hierarchies

2004-03-31 Thread Jakob Braeuchi
hi edson, this is imo a know fact. ojb requires to pk to be unique within a class hierarchy. let's assume you have a class D referencing 1:1 an A identified by id =1. if this id is not unique in the class hierarchy, then ojb does not know if it's an A, B or C. imo there's no other way than to de

Re: Probleml with Mapping Inheritance Hierarchies

2004-03-31 Thread Edson Carlos Ericksson Richter
Of course, I'll try (all package test). public class A { public int id; public String description; } public class B extends A { public double value; } public class C extends A { public Date value; } class="test.C" table="tableC"> name="id" column="id"

Default persistence broker error after session died

2004-03-31 Thread Hernan Gustavo Bertagni
Hello all, I've inherited an application made by others, and it uses OJB (1.0) to access the database (an Oracle 9i). I'm having a problem with the persistence broker. The application gets the broker using the PersistenceBrokerFactory.defaultPersistenceBroker() and it works well most of the time

Re: Re: Transaction question

2004-03-31 Thread Leandro Augusto de Almeida
Hi Armin, I put the broker.beginTransaction() and broker.commitTransaction() only for test, because I was getting the same exception on broker.close() and now on broker.commit() (because commit closes the con...). Using the old datasource (not XA) this works fine. The bean that calls this method

Re: Transaction question

2004-03-31 Thread Armin Waibel
Hi Leandro, could you post a snip of the source code? regards, Armin Leandro Augusto de Almeida wrote: Hi Armin, I was using a DataSource (in Websphere) from the Jdbc Provider oracle.jdbc.pool.OracleConnectionPoolDataSource and using the PB-tx-demarcation (broker.beginTransaction().). When

Re: Re: Transaction question

2004-03-31 Thread Leandro Augusto de Almeida
Hi Armin, I was using a DataSource (in Websphere) from the Jdbc Provider oracle.jdbc.pool.OracleConnectionPoolDataSource and using the PB-tx-demarcation (broker.beginTransaction().). When I changed the datasource to oracle.jdbc.xa.client.OracleXADataSource the application shows this excepti

Re: Probleml with Mapping Inheritance Hierarchies

2004-03-31 Thread Armin Waibel
Hi Edson, can you send me an test case for this problem? Or can you describe how the test case should look like? regards, Armin Edson Carlos Ericksson Richter wrote: Sorry by reposting, but appear that my last post wasn't to the list... --- I can reproduce this problem with

Re: [bug] cannot reach data in chaining iterator because resources ar e closed

2004-03-31 Thread Armin Waibel
Hi Roger, think I changed this behaviour between rc5 and rc6. Each RsIterator is associated a PB instance at creation time. So if you close the PB the RsIterator was no longer valid. On PB.close() the used connection will be closed (returned to pool). Thus all references to Statement or Result

Behavior of ODMG personality and many-to-many relationships and default cache implementation

2004-03-31 Thread Sean Dockery
Consider the following classes that represent a many-to-many relationship: public class Category { private Collection products; public Collection getProducts() { return products; } public void setProducts(Collection newProducts) { products

What should I use for the initial value of a collection field in a new object? and a related question.

2004-03-31 Thread Sean Dockery
I have an application that uses the ODMG personality of OJB. I query objects and collections using PersistenceBroker Criteria; the PersistenceBroker is obtained from a Transaction object (via TransactionExt). Objects are stored via a tx.lock plus a tx.markDirty call. The application uses the

Persisting a class that implements Map

2004-03-31 Thread "Gonçalo E.D. Luiz"
Hi. I waant to persist the following class: class A { int a; MyClass b; } MyClass is a class that implements Map. It is not a collection and therefore I cannot use a collection descriptor. Each entry on the b field has a key and a value of the Class b. Class b is class B { int b; } I want to st

RE: Foreign key lookups

2004-03-31 Thread Gelhar, Wallace Joseph
Hi Laurie, There was a discussion of adding support for this type of thing about a year ago. The debate came when discussing adding support for more than simply "=". For example, when I create a query such as: query.create("select all from " + Team.class.getName() + " where player > $1"); What

Re: AbstractPersistentField Question

2004-03-31 Thread Gary
Thomas: Thanks for your reply. I am already at version 1.17 of AbstractPersistentField . I have already tried overriding computeField(), and in it calling AbstractPersistentField.computeField(); I catch the MetadateException and then try to replace the interface Class with an actual implementer

PhillyJUG OJB Slides

2004-03-31 Thread Brian McCallister
A few people expressed interest in the slides from my PhillyJUG OJB presentation last night, so I have put them online at http://kasparov.skife.org/ojb-phillyjug.pdf -Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

RE: OJB and JCS

2004-03-31 Thread Guillaume Nodet
After having read to serveral informations about jcs, i found it is preferred to use strings instead of objects for cached object keys. As it seems that the string representation of Identity objects is unique, it should seems better than the jcs cache implementation uses these strings instead of I

RE: [bug] cannot reach data in chaining iterator because resource s ar e closed

2004-03-31 Thread Janssen, Roger
>>do i have to create a list, iterate over them all and one by one add them to >>the list. >yes, that's what I did. >but because I'm not an expert, you should wait for other opinions okay, i will wait for some more responses. >andreas roger **

[Fwd: Re: [bug] cannot reach data in chaining iterator because resource s ar e closed]

2004-03-31 Thread Andreas Bohnert
do i have to create a list, iterate over them all and one by one add them to the list. yes, that's what I did. but because I'm not an expert, you should wait for other opinions andreas Janssen, Roger wrote: hi, how can i put them in a list? do i have to create a list, iterate over them all a

Re: [bug] cannot reach data in chaining iterator because resource s ar e closed

2004-03-31 Thread Andreas Bohnert
do i have to create a list, iterate over them all and one by one add them to the list. yes, that's what I did. but because I'm not an expert, you should wait for other opinions andreas Janssen, Roger wrote: hi, how can i put them in a list? do i have to create a list, iterate over them all an

RE: [bug] cannot reach data in chaining iterator because resource s ar e closed

2004-03-31 Thread Janssen, Roger
hi, how can i put them in a list? do i have to create a list, iterate over them all and one by one add them to the list. so displaying a list, this drastically increases the amount of steps needed to display it. -Original Message- From: Andreas Bohnert [mailto:[EMAIL PROTECTED] Sent: Wed

Re: [bug] cannot reach data in chaining iterator because resources ar e closed

2004-03-31 Thread Andreas Bohnert
hello janssen, i had the same 'problem'. now I put all items in a list, close the pk, and iterate over the list now. from my point of view, I would say it was a bug, that ojb has allowed to iterate with a closed pk. because there can be no cursor left to iterate over the query. well, that's wha

[bug] cannot reach data in chaining iterator because resources ar e closed

2004-03-31 Thread Janssen, Roger
Hi, I'm migrating from rc4 to rc6. I now am confronted with the behaviour of RsIterator with its close binding to a persistencebroker instance. Case 1: - 1. create persistence broker - 2. issue a query, resulting in an java.util.Iterator. - 3. close broker - 4. do something with iterator In