chun wrote:
"DELETE from Grupo grp where grp.ugUsuario.usId = 1"
@JoinTable(name = "compartilhado.usuario_grupo", joinColumns = {@JoinColumn(name = "ug_grupo", referencedColumnName = "gr_id")}, inverseJoinColumns = {@JoinColumn(name = "ug_usuario", referencedColumnName = "us_id")})
@ManyToMany(fetch=FetchType.EAGER)
private java.util.Set <Usuario> ugUsuario = new HashSet<Usuario>();
This query is definitively not valid. If this works on Toplink, please report a bug to the Toplink team. you must not access a single property of a collection through a dotted operation (ugUsuario.usId), this simply does not make sense.
Use a subselect and a the join keyword.