Thanks nuffsaidx it's a good solution, but if I have to modify the database I think it's better solution add a foreing key in table phones for each entity.
Thanks for all.
[Message sent by forum member 'tonhinbm' (tonhinbm)]
http://forums.java.net/jive/thread.jspa?messageID=322900