Strange Behaviour With MySql, SQLContainer, Long and Integer

Hello,

I have a strange behaviour when trying to add new row in a sqlcontainer, committing to mysql and retriving the row.

When the row is saved the Id is retrieved as a Long (created by mysql).
To search for that item I have to convert it to Integer.

       

head.addRowIdChangeListener(new RowIdChangeListener(){

            private static final long serialVersionUID = 1128167464731496937L;

            @Override
            public void rowIdChange(RowIdChangeEvent event) {
                
                RowId ri = event.getNewRowId(); // the new generated row
                Object obj = ri.getId()[0]
; // in mysql as ID int NOT NULL AUTO_INCREMENT PRIMARY KEY
                Long in = (Long) obj; // this is a long 
                
                Item i1 = head.getItem(ri); // return null
                Item i2 = head.getItem(new RowId(in)); // return null
                Item i3 = head.getItem(new RowId(new Integer(in.intValue()))); // return the item
                

            }

        });    

best regards
marco