Entity beans are supposed to make my life easier, right?
Well, I’ve been trying all day to delete a record using entity beans. The SQL is simple. I could do it by hand in 3 lines, including related items. It’s easy in EJB too. All you have to do is remove the offending record from the collection. Except IT NEVER GOES AWAY! It will say it’s gone. And then when you requery the table, it’s still there. You can’t use the record manager to do it directly though. You have to remove it from the collection. And now we’ve come full circle and it still doesn’t work.
This should just work. Deleting a record is a simple, straight forward thing. There’s no hints in the documentation. There’s no debugging information. As with way too much EJB related it’s just trial and error. A lot of trials and a lot of errors, and many hours later I have no idea how to get this to work.
If I’d used JDBC, I would have been done about 8 hours ago. As it is, I have no idea.
At least Canada beat Russia in Olympic hockey tonight.
Oh, and for some unfathomable reason, JAX-WS exceptions can’t be serialized. But that’s a story for another day.