Hi, I have a Java object mapped from the database that has a composite
primary key defined as following (showing only the fields that are
contained in the primary key):
public class Ticket implements Serializable {
...
private Integer number;
private Integer channel;
private Date date; // java.sql.Date! not java.util.Date
...
}
In the FDS portion of the application the managed object that
corresponds to it is also well defined:
public class Ticket {
...
var public number : Number;
var public channel : Integer;
var public date : Date;
...
}
The destination of the DataService object is like:
...
<destination id="tickets-destination">
...
<metadata>
<identity property="number" type="java.lang.Integer" />
<identity property="channel" type="java.lang.Integer" />
<identity property="date" type="java.sql.Date" />
...
</metadata>
...
</destination>
...
ok... I'm able to do a call to ds.fill(ticketsList) successfully. But
when I try to insert a new Ticket in the managed ArrayCollection
ticketsList and commit the changes (my autoCommit is disabled) I get a
fault with the following faultString:
Unable to invoke a get method for destination 'tickets-destination'
because the identity type(s) did not match. Received [class
java.lang.Integer, class java.util.Date, class java.lang.Integer].
Expected [class java.lang.Integer, class java.sql.Date, class
java.lang.Integer].
The ticket is not displayed in the DataGrid that has dataProvider binded
to that ArrayCollection, but it is passed to the back end Assembler
class that persist it in the database correctlly. The next time I make a
call to ds.fill(ticketsList) the object is retrieved successfully.
Anyone knows why is this happening? I've defined the type of the date
identity as java.sql.Date, so why is the invoke made with a
java.util.Date parameter??