Table annotation shouldn't be mandatory
NicolaIsotta opened this issue · comments
Nicola Isotta commented
Right now, for CRUD operations, database table name is evaluated in this method:
SansOrm/src/main/java/com/zaxxer/sansorm/internal/Introspected.java
Lines 165 to 176 in ab22721
If the class does not have the
@Table
annotation, tableName
is null and this could lead to various type of confusing exception from the jdbc drivers, such as: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'null'.
Is the a reason why this method does not default to clazz.getSimpleName()
when there is no @Table
annotation?