Hibernate and inheritence
===

I have two tables **Text** and inhereted **TextUser**.

**Text** contains: id, textType <br/>
**TextUser** contains: id, locale, name, title

**TextUser.id** is foreign key to **Text.id**. So example of join will be:

###Text.id - Text.textType - TextUser.id - TextUser.locale - TextUser.name###

    100          1            100          en            name1
    100          1            100          fr            name2
    101          1            101          en            name3

So having key 100 we have one record in Text and two records with the same id but different locales (en, fr) in TextUser.

It's a legacy system so i can't modify the structure. Now I'm trying to process it with hibernate.

    @Entity(name = "Text")
    @Inheritance(strategy = InheritanceType.JOINED)
    public abstract class Text {
    
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        @Column(name = "TextId")
        private Long id;
    
        @Column(name = "TextType")
        private Integer textType;

and

        @Entity
        @Table(name = "TextUser")
        @ForeignKey(name = "FK_TextUser_Text")
        public class TextUser extends Text {
        
            @Column(name = "locale")
            private String locale;
        
            @Column(name = "name")
            private String name;


So it works perfectly for one locale. But how can I insert new value with key 100, but new locale? We have ID in Text and hibernate uses it for foreign key TextUser.id. So if I set explicitly id but different locale I will get *"org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session"* 
