I'm getting this when trying to remove a topic that is
a player in an association:
java.sql.SQLException: ERROR: update or delete on
"tmobjects" violates foreign key constraint
"fk61e7b90dc6f0e22b" on "member_players"
I was expecting it to be a TMAPI TopicInUseException or
at least a TM4J IntegrityViolationException.
Looking at the destroy method in the Hibernate
TopicImpl, and bearing in mind that I'm not familiar
with the TM4J schema, it doesn't seem to do a check for
this case.
Kal thinks this might be a missing rule from the
Hibernate backend.
Logged In: YES
user_id=176992
Validated with a new unit test.
Logged In: YES
user_id=176992
Code now checks that the topic does not play any roles
before trying to destroy it.
Logged In: YES
user_id=1064816
Works a treat. Thanks.