Commit 24f53c1e authored by Valentin Suhnjov's avatar Valentin Suhnjov

RIHAKB-141. Fix table name resolution when querying entities

parent 844bd7a6
......@@ -74,7 +74,7 @@ public class ApiGenericDAOImpl<T, K> implements ApiGenericDAO<T, K> {
return clazz.getSimpleName();
} else {
Table table = clazz.getAnnotation(Table.class);
return table.schema() + "." + table.name();
return (StringUtils.isBlank(table.schema()) ? "" : table.schema() + ".") + table.name();
}
}
......
......@@ -33,7 +33,7 @@ import ee.eesti.riha.rest.model.util.FieldIsPK;
@TypeDefs({@TypeDef(name = "JsonObject", typeClass = JsonObjectUserType.class) })
@Transactional
@Entity
@Table(name = "comment")
@Table(name = "comment", schema = "riha")
@JsonInclude(Include.NON_NULL)
public class Comment implements BaseModel {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment