mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
This commit is contained in:
@@ -15,4 +15,14 @@ public class MatchingNamingConventionTest {
|
||||
String col = namingConvention.getColumnFromProperty(null, fkCol);
|
||||
assertThat(col).isEqualTo(fkCol);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getForeignKey() {
|
||||
|
||||
String fk = namingConvention.getForeignKey("billingAddress", "id");
|
||||
assertThat(fk).isEqualTo("billingAddressId");
|
||||
|
||||
fk = namingConvention.getForeignKey("billingAddress", "remoteIdProperty");
|
||||
assertThat(fk).isEqualTo("billingAddressRemoteIdProperty");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,13 @@ public class UnderscoreNamingConventionTest {
|
||||
assertThat(col).isEqualTo(fkCol);
|
||||
}
|
||||
|
||||
}
|
||||
@Test
|
||||
public void getForeignKey() {
|
||||
|
||||
String fk = namingConvention.getForeignKey("billing_address", "id");
|
||||
assertThat(fk).isEqualTo("billing_address_id");
|
||||
|
||||
fk = namingConvention.getForeignKey("billing_address", "remoteIdProperty");
|
||||
assertThat(fk).isEqualTo("billing_address_remote_id_property");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user