**Database**

```
*user_account*
id (PK)
email
password

*user_detail*
id(PK)(FK)
name
city

```

**Entities**

> 
> @Table(name="user\_detail")
>  public class UserDetail implementsSerializable{
> 
> 
> 
> ```
> @Id private Integer id;
> ...
> @OneToOne
> @JoinColumn(name="id")
> private UserAccount userAccount;
> 
> ```
> 
> }
> 
> 
> 

```
@Table(name="user_account")
public class UserAccount implementsSerializable{
    @Id private Integer id;
    @OneToOne(mappedBy="userAccount")
    private UserDetail userDetails;
}

```

**Error**
Exception Description: Multiple writable mappings exist for the field [user\_detail.ID]. Only one may be defined as writable, all others must be specified read-only.