Remove hackcode forze of lazy loading.

This commit is contained in:
Paulo Gustavo Veiga 2022-02-12 12:34:30 -08:00
parent ccc0b10ea0
commit 89dd7e0193

View File

@ -1,20 +1,20 @@
/*
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.wisemapping.model;
@ -29,22 +29,24 @@ public class Collaboration implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;;
private int id;
;
@Column(name = "role_id",unique = true,nullable = true)
@Column(name = "role_id", unique = true)
private CollaborationRole role;
@ManyToOne
@JoinColumn(name="mindmap_id",nullable = false)
@JoinColumn(name = "mindmap_id", nullable = false)
private Mindmap mindMap;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="colaborator_id",nullable = false)
@JoinColumn(name = "colaborator_id", nullable = false)
private Collaborator collaborator;
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name="properties_id",nullable = false, unique = true)
private CollaborationProperties collaborationProperties = new CollaborationProperties();;
@JoinColumn(name = "properties_id", nullable = false, unique = true)
private CollaborationProperties collaborationProperties = new CollaborationProperties();
;
public Collaboration() {
}
@ -129,10 +131,9 @@ public class Collaboration implements Serializable {
@Override
public int hashCode() {
int result = (int) (id ^ (id >>> 32));
int result = id ^ (id >>> 32);
result = 31 * result + (role != null ? role.hashCode() : 0);
result = 31 * result + (mindMap != null ? mindMap.hashCode() : 0);
result = 31 * result + (collaborator != null ? collaborator.hashCode() : 0);
return result;
}
}