Generic foreign keys for JDB