I've not tryied to use junit tests because OJB is working fine with SapDB
since 0.9.2 (at least, for me).
Unique real trouble is with M:N mappings, since I need to explicit define
schema for relation table (I'm writing a fix for this based on 0.9.5
sources, and this is why I've discovered the setters/getters "bug").
I've write a SequenceManager that works with native SapDB sequences (and
should work with Oracle too), and all is running lovely in my app (Tomcat 4
based mid sized web app).
If you have any questions about SapDB with OJB, put on the list. In my
(limited) time I'll try to help.
Best regards,
Edson Richter
-----Mensagem original-----
De: David Raphael <[EMAIL PROTECTED]>
Para: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Data: Quinta-feira, 5 de Setembro de 2002 17:40
Assunto: Re: Getter/Setters trouble
>This isn't a solution but a question:
>
>Were you able to build the junit tests with sap-db?
>
>Cheers,
>dAvid
>
>
>>From: "Edson Carlos Ericksson Richter" <[EMAIL PROTECTED]>
>>Reply-To: "OJB Users List" <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Subject: Getter/Setters trouble
>>Date: Wed, 4 Sep 2002 09:59:06 -0300
>>
>>Hi!
>>
>>Plataform: Win2K, SapDB 7.3.0.24 with JDBC 7.3.0.26a
>>Version: OJB 0.9.5 build from sources without modifications (build
>>jar-debug).
>>
>>I have a bean, let's say:
>>
>>public class MyBean extends Object implements Serializable {
>> public MyBean( );
>>
>> private int v1;
>> private String n1;
>> private ArrayList a1;
>>
>> public void setV1( int newV1 ) {
>> v1 = newV1;
>> }
>>
>> public int getV1( ) {
>> return v1;
>> }
>>
>> public void setN1( String newN1 ) {
>> n1 = newN1;
>> }
>>
>> public String getN1( ) {
>> return n1;
>> }
>>
>> public void setA1( Collection newA1 ) {
>> if( a1 == null )
>> a1 = new ArrayList( );
>> else
>> a1.clear( );
>> a1.addAll( newA1 );
>> }
>>
>> public Collection getA1( ) {
>> return a1;
>> }
>>}
>>
>>Ok, this works fine in a 1:n mapping or a M:N decomposable mapping.
>>But if I add the following methods, I get NullPointerException:
>>
>> public void setA1( int index, MyOtherBean value ) {
>> if( a1 == null )
>> a1 = new ArrayList( );
>>
>> if( index >= a1.size( ) )
>> a1.add( value );
>> else
>> a1.set( index, value );
>> }
>>
>> public MyOtherBean getA1( int index ) {
>> if( a1 == null )
>> return null;
>>
>> if( index >= a1.size( ) )
>> throw new IndexOutOfBoundException( );
>>
>> return ( MyOtherBean )a1.get( index );
>> }
>>
>>The error occur at line 929 of PersistentBrokerImpl.java.
>>
>>Thanks for any tips (or anyone can confirm that this is a bug?)!
>>
>>Edson Richter
>
>
>
>
>_________________________________________________________________
>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
>--
>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>