I am playing with the data features in Flash4. I can get a flex app to work that will query and update a J2EE entity that has no foreign keys, but when I try the same with an entity that has many to one foreign keys I get a null pointer error coming from the server. I created a servlet to do the same update and that worked.
I'm wondering if the issue is a casting issue. I know I have to do the configure data types thing to some of the generated service calls to let it know what action script class is appropriate (instead of a generic object ) e.g. findAll(). Do I have to do a similar thing for one to many foreign key situations? i.e. lets say i have a department - employees model. On the java side the department entity has a variable that is a set of employees. In the department.as class I'd have a employees field thats an ArrayCollection. Do I have to let it know somewhere that this is an ArrayCollection of employee.as objects?
FYI, I've already changed to eager fetching of the fk values.
Does anyone have this working?
I've also realized that the flex app can update rows that have no foreign key links just fine, but if there are foreign key values it blows up. i.e. I can successfully update a department that has no employees, but not one with employees.