I'm using ImprovedNamingStrategy in my application and omitting JPA annotations like @Column. So far I have been happy with it, but I'm seeing weird plural naming with a @ManyToMany join table.
Here's the relevant Java code:
Code:
@Entity
public class Specialty
{
private int fId;
private List<Variable> fVariables = new ArrayList<>();
public Specialty()
{
}
@Id
public int getId()
{
return fId;
}
void setId(int id)
{
this.fId = id;
}
[...snip...]
@ManyToMany(fetch = FetchType.LAZY)
public List<Variable> getVariables()
{
return fVariables;
}
void setVariables(List<Variable> variables)
{
fVariables = variables;
}
}
This generates a join table like:
Code:
specialty_variables
-------------------
specialty integer
variables integer
whereas I expected
Code:
specialty_variable
------------------
specialty_id integer
variable_id integer
Why the pluralization?