Skip to content
Snippets Groups Projects
Commit d3fb3a44 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

plugin data entries annotation columns removed

parent 6631a6aa
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!472Resolve "Implement Hibernate naming strategy"
Pipeline #7172 passed
......@@ -39,10 +39,10 @@ public class PluginDataEntry implements Serializable {
@ManyToOne(fetch = FetchType.LAZY, optional = false)
private Plugin plugin;
@Column(name = "entry_key", nullable = false)
@Column(nullable = false)
private String key;
@Column(name = "entry_value", nullable = false)
@Column(nullable = false)
private String value;
public int getId() {
......
......@@ -25,12 +25,12 @@ public class PluginDataEntryDao extends BaseDao<PluginDataEntry> {
public PluginDataEntry getByKey(Plugin plugin, String key, User user) {
List<Pair<String, Object>> params = new ArrayList<>();
params.add(new Pair<String, Object>("plugin_id", plugin.getId()));
params.add(new Pair<String, Object>("entry_key", key));
params.add(new Pair<>("plugin_id", plugin.getId()));
params.add(new Pair<>("key", key));
if (user == null) {
params.add(new Pair<String, Object>("user_id", null));
params.add(new Pair<>("user_id", null));
} else {
params.add(new Pair<String, Object>("user_id", user.getId()));
params.add(new Pair<>("user_id", user.getId()));
}
List<PluginDataEntry> entries = getElementsByParameters(params);
if (entries.size() > 0) {
......
alter table plugin_data_entry_table rename column entry_value to value;
alter table plugin_data_entry_table rename column entry_key to key;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment