openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Remove toString from children of OpenJPAId - Please - please - please
Date Mon, 07 Apr 2008 23:30:43 GMT
Hi Abe,

On Apr 7, 2008, at 8:57 AM, Abe White wrote:

> I believe parts of OpenJPA may rely on being able to stringify an id  
> and
> then reconstruct it using the id class's Class,string constructor.   
> (And
> if not OpenJPA, then certainly Kodo's JDO bindings).

Right, so the String should be the more detailed String but with the  
actual subclass name instead of the superclass.

So isn't this a bug, for which we would dearly love to see a patch?


P.S. As Patrick pointed out, anyone can play with the code via svn and  
see where the problem is and how to fix it.

It might be good to start with a test case and we can discuss whether  
the behavior currently implemented is correctly designed.
> On Fri, 2008-04-04 at 17:32 -0700,  
> wrote:
>> I dont think anyone responded to this request yet - so I am asking  
>> again
>> I would like OpenJPA to remove all the toString() method on all  
>> children
>> class of OpenJPAId.
>> Reason: OpenJPAId class already has the toString() and it handles  
>> it well.
>> It puts the type and the id together - like this:
>> com.myCompany.Account-2345
>> This is very useful behavior when managing a cache (or even looking  
>> into
>> the log file).
>> Currently all the children have their own toString() which just  
>> outputs the
>> id - This is not useful becuase it is not possible to distinguish  
>> between
>> the types inside one cache. All types in the cache are  
>> DataCachePCData.
>> Frederic
>> PS: Can someone give me check in right in the code base... ;) -  
>> Have a good
>> week end everyone.
> Notice:  This email message, together with any attachments, may  
> contain information  of  BEA Systems,  Inc.,  its subsidiaries  and   
> affiliated entities,  that may be confidential,  proprietary,   
> copyrighted  and/or legally privileged, and is intended solely for  
> the use of the individual or entity named in this message. If you  
> are not the intended recipient, and have received this message in  
> error, please immediately return this by email and then delete it.

Craig Russell
Architect, Sun Java Enterprise System
408 276-5638
P.S. A good JDO? O, Gasp!

View raw message