<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi, Emmanuel,<br>
<br>
The problem is in interpretation of specified names with dots.<br>
<br>
I created naming strategy where all method just join all passed
parameters with "_".<br>
For example <br>
@Override<br>
&nbsp;&nbsp;&nbsp; public String collectionTableName(String ownerEntity,&nbsp; String
ownerEntityTable, String associatedEntity,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String associatedEntityTable, String propertyName) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return ownerEntity + "_"+ associatedEntity+ "_" +
associatedEntityTable + "_" + associatedEntity&nbsp; +<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "_" +propertyName;<br>
&nbsp;&nbsp;&nbsp; }<br>
<br>
<br>
And what I have found:<br>
<br>
@Entity(name = "e.M11")<br>
public class ManyToMany1 implements Serializable {<br>
&nbsp;&nbsp;&nbsp; <br>
}<br>
<br>
What do you think will be DB table name? The correct answer is "e.M11".<br>
The same for @Entity @Table(name = "e.M11") <br>
<br>
But when this entity is used in relationship mapping as target entity
things become different:<br>
for @Entity(name = "e.M11") entity.ManyToMany2_entity.ManyToMany1_<b>M11</b>_entity.ManyToMany1_mtm1<br>
for @Table(name = "e.M11") entity.ManyToMany2_entity.ManyToMany1_<b>e.M11</b>_entity.ManyToMany1_mtm1<br>
<br>
I didn't see any specification for how NamingStrategy should be used.
And I even *fear* to compare this behaviour with core hibernate
behaviour. I guess there will be some differences too.<br>
<br>
Dmitry. <br>
<br>
</body>
</html>