Hi Catalina, On Aug 13, 2007, at 6:20 PM, catalina wei wrote:
The method I am changing is a private method, so no javadoc is required.
I'm not sure what this statement means. Javadoc is not solely for the purpose of documenting public methods. It's a way of helping developers who in future will have to look at the code and try to figure out if the behavior they're seeing is correct or not in context.
I'd really like to see the comments below incorporated into the code. Whether it's in javadoc or comments contained in the body of the method is a matter of style, but let's make it easier for future developers.
Regards, Craig
subs flag indicates whether a relation is non-polymorphic relation or not. In this test scenario, we are dealing with a polymorphic relation, so thetype should be determined by the discriminator value.The discriminator value can be null in the database because this column is nullable (our mapping tool does not enforce it as 'not null' column, so itis possible that other non-jpa application insert a row with nulldiscriminator value ). We do not want a null discriminator value end up withan Exception. So the empty catch block is simply ignore potential data related error in fetching the discriminator value.Essentially, if the discriminator is not present, we want the type initiallyset in oid to be used (which is the ClassMapping cls passed in to the getObjectId method).Otherwise set the correct type in the oid based on the discriminator value.Catalina
Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature
