select a subset of object attributes

2004-03-30 Thread reto
Hi togheter, I want to retrieve only a subset of the attributes of an object (not retrieving the blobs in the object). I use the PersistenceBroker API. Can anybody give me a hint if that's possible without going back and using sql direct? thanks reto

Re: Newbie at a standstill

2004-03-30 Thread raphael . x . mankin
I have done the 'ant build' and it makes no difference. If in the db.open() I change to the default db alias the system appears not to see my parameters at all. It has username and password set to null. There is clearly something terribly obvious that I am just not understanding about setting up

Re: Insert instead of update generated in RC6

2004-03-30 Thread Guido Beutler
Hi Armin, Armin Waibel wrote: Hi again, all ejb-example tests pass (odmg- and PB-Tests) on JBoss 3.2.2 and MaxDB. Maybe I forget to write a test for object update ;-). Do you remember our DataSource problem with 3.2.2.RC3 with missing results? Maybe that the behavior is different to JBoss

Re: Insert instead of update generated in RC6

2004-03-30 Thread Guido Beutler
Hi again, Guido Beutler wrote: Hi Armin, Armin Waibel wrote: Hi again, all ejb-example tests pass (odmg- and PB-Tests) on JBoss 3.2.2 and MaxDB. Maybe I forget to write a test for object update ;-). Do you remember our DataSource problem with 3.2.2.RC3 with missing results? Maybe that the

Re: Newbie at a standstill

2004-03-30 Thread Armin Waibel
Hi Raphael, from your stack trace I can see you manipulate many of the default jdbc settings: Caused by: org.apache.ojb.broker.accesslayer.LookupException: Could not borrow connection from pool - org.apache.ojb.broker.metadata.JdbcConnectionDescriptor: [EMAIL PROTECTED]

Re: Insert instead of update generated in RC6

2004-03-30 Thread Armin Waibel
do you use anonymous keys? If so where? Do you remember our DataSource problem with 3.2.2.RC3 with missing results? No, can you describe this problem again? Should I update to JBoss 3.2.3 and run the tests again? Armin Guido Beutler wrote: Hi again, Guido Beutler wrote: Hi Armin, Armin

Re: auto-delete does not work anymore: rc6???

2004-03-30 Thread Andreas Bohnert
hello armin, yes, I did replace the repository.dtd. I just simplified my application source. Here is the client/server code that produce the wrong deletes. I'm using jboss 3.2.3 and postgresql 7.4.1. the repository files and the database structure is attached. it's strange, because I think, the

Re: select a subset of object attributes

2004-03-30 Thread Armin Waibel
Hi, reto wrote: Hi togheter, I want to retrieve only a subset of the attributes of an object (not retrieving the blobs in the object). I use the PersistenceBroker API. Can anybody give me a hint if that's possible without going back and using sql direct? thanks reto - you can use Report Queries

Re: Insert instead of update generated in RC6

2004-03-30 Thread Guido Beutler
Armin Waibel wrote: do you use anonymous keys? If so where? Do you remember our DataSource problem with 3.2.2.RC3 with missing results? No, can you describe this problem again? Should I update to JBoss 3.2.3 and run the tests again? we had the problem, that not all objects were returned by

Re: auto-delete does not work anymore: rc6???

2004-03-30 Thread Armin Waibel
Hi Andreas, your code seems ok. Do you manipulate metadata at runtime? Maybe the auto-delete flag change at runtime. Can you check this in your deleteValidate(...)-method Collection ords = broker.getClassDescriptor(Repository.class).getObjectReferenceDescriptors(); for(Iterator iterator =

Re: Newbie at a standstill

2004-03-30 Thread raphael . x . mankin
Thank you for your help. I will try your suggestions. I did read all the docs I could find, but did not find them terribly clear. My life is made more difficult by doing this job under Windows and not Unix - it is a matter of where I have Oracle client libraries installed and also have GUI-based

Re: auto-delete does not work anymore: rc6???

2004-03-30 Thread Andreas Bohnert
hi armin, that was a good suggestion! I don't change the meta data at runtime, but it seems that my auto-delete='false' is replaced (because it's now deprecated) with an auto-delete='object', but it should be replaced with 'none'! well, that what I would excpect ;) thats what I got:

Re: Insert instead of update generated in RC6

2004-03-30 Thread Guido Beutler
Guido Beutler wrote: Armin Waibel wrote: do you use anonymous keys? If so where? Do you remember our DataSource problem with 3.2.2.RC3 with missing results? No, can you describe this problem again? Should I update to JBoss 3.2.3 and run the tests again? we had the problem, that not all

Re: Insert instead of update generated in RC6

2004-03-30 Thread Armin Waibel
Hi, returns true for my SMALLINT objects if the value is 0. But 0 is a leagal value for SMALLINT PK attributes. Gotcha! Do you have declared the SMALLINT field as primitive field in your object and declare this field as PK in class-descriptor? In that case OJB assume the field represents

Re: Insert instead of update generated in RC6

2004-03-30 Thread Guido Beutler
Hi, changing public boolean representsNull(FieldDescriptor fld, Object aValue) { . if(((aValue instanceof Number) (((Number) aValue).longValue() == 0))) { result = fld.getPersistentField().getType().isPrimitive() fld.isPrimaryKey(); }

Re: Insert instead of update generated in RC6

2004-03-30 Thread Armin Waibel
Guido Beutler wrote: Hi, changing public boolean representsNull(FieldDescriptor fld, Object aValue) { . if(((aValue instanceof Number) (((Number) aValue).longValue() == 0))) { result = fld.getPersistentField().getType().isPrimitive() fld.isPrimaryKey();

Re: Insert instead of update generated in RC6

2004-03-30 Thread Edson Carlos Ericksson Richter
Let me make some comments: Using primitive, then there is no other way to specify a nullability. I think we can take to the developer a choice to use nullable and primitive int but keep it always warned that 0 will save NULL in the database, and a NULL in database will, in turn, be converted

Re: Insert instead of update generated in RC6

2004-03-30 Thread Guido Beutler
Hi, Edson Carlos Ericksson Richter wrote: Let me make some comments: Using primitive, then there is no other way to specify a nullability. I think we can take to the developer a choice to use nullable and primitive int but keep it always warned that 0 will save NULL in the database, and a

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

2004-03-30 Thread Janssen, Roger
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 noticed that this methode has been deprecated. It says i should use the fullSize method on the OJBIterator interface. I could use this, but then i have to refactor

Re: Insert instead of update generated in RC6

2004-03-30 Thread Guido Beutler
Armin Waibel wrote: Guido Beutler wrote: Hi, changing public boolean representsNull(FieldDescriptor fld, Object aValue) { . if(((aValue instanceof Number) (((Number) aValue).longValue() == 0))) { result = fld.getPersistentField().getType().isPrimitive()

Re: Insert instead of update generated in RC6

2004-03-30 Thread Edson Carlos Ericksson Richter
I agree with you. Conversion is one way to get things working, as OJB executing a select to test with already exists a record with PK 0 is another way. The auto-increment field should be tested when in PK that is inherently not-null. In this case, there is no other way (exception if we create a

Re: auto-delete does not work anymore: rc6???

2004-03-30 Thread Armin Waibel
Hi Andreas, I think you are right, seems auto-delete false/true is not handled correct. I will fix this. regards, Armin Andreas Bohnert wrote: hi armin, that was a good suggestion! I don't change the meta data at runtime, but it seems that my auto-delete='false' is replaced (because it's now

Probleml with Mapping Inheritance Hierarchies

2004-03-30 Thread Edson Carlos Ericksson Richter
Sorry by reposting, but appear that my last post wasn't to the list... --- I can reproduce this problem with OJB 1.0rc6. Appear that when two or more tables with same PKs, with identical values for their PKs have the following behaviour: a) Get Identity for the first object.

Re: auto-delete does not work anymore: rc6???

2004-03-30 Thread Armin Waibel
Hi again, the fix is in CVS. Now should the new auto-xxx really backward compatible and should be handled in a way described in http://db.apache.org/ojb/tutorial3.html#1:1%20auto-xxx%20setting regards, Armin Andreas Bohnert wrote: hi armin, that was a good suggestion! I don't change the meta

AbstractPersistentField Question

2004-03-30 Thread Gary
I am wondering why the methods getFieldRecursive() and getNestedFieldRecursive() in class AbstractPersistentField are private. I would like to have the ability to override them in a custom persistent field implementation. Here is my dilemma: I have the following classes: package ojb; public

Re: Transaction question

2004-03-30 Thread Armin Waibel
Hi Leandro, Leandro Augusto de Almeida wrote: Is it possible to use PB-tx-demarcation on a session bean with bm-tx and getting a connection from a DataSource from my AppServer? Is it right? What is the correct connection factory to use? Or I must use the user (JTA) tx-demarcation with the

Re: AbstractPersistentField Question

2004-03-30 Thread Thomas Dudziak
On Tue, 30 Mar 2004, Gary wrote: I am wondering why the methods getFieldRecursive() and getNestedFieldRecursive() in class AbstractPersistentField are private. I would like to have the ability to override them in a custom persistent field implementation. Here is my dilemma: I have the

Foreign key lookups

2004-03-30 Thread Laurie Harper
I never did get a conclusive answer on this, so I'm reposting with more background. What I was hoping to be able to do is something like this: Player p = getPlayer(); OQLQuery query = odmg.newQuery(); query.create(select all from + Team.class.getName() + where player =

Re: auto-delete does not work anymore: rc6???

2004-03-30 Thread abo
thank you armin, I will check it out regards andreas Armin Waibel wrote: Hi again, the fix is in CVS. Now should the new auto-xxx really backward compatible and should be handled in a way described in http://db.apache.org/ojb/tutorial3.html#1:1%20auto-xxx%20setting regards, Armin Andreas

OJB and JCS

2004-03-30 Thread Guillaume Nodet
Hi ! I'm trying to use JCS for the cache layer in OJB and encountered the following problem: the hash code of the Identity object is computed using the hash code of the top-level class of the real subject. The problem is that the hashCode() method of the Class object is not overrident so that