<commit_before>package eu.bcvsolutions.idm.core.model.entity;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
import org.hibernate.envers.Audited;

import com.fasterxml.jackson.annotation.JsonBackReference;

import eu.bcvsolutions.idm.core.api.entity.AbstractEntity;

/**
 * Intersection table beetween role and identity - guarantee of role
 * 
 * @author <NAME> <<EMAIL>>
 *
 */

@Entity
@Table(name = "idm_role_guarantee", indexes = {
				@Index(name = "idx_role_guarantee_guarantee", columnList = "guarantee_id"), 
				@Index(name = "idx_role_guarantee_role", columnList = "role_id") } )
public class IdmRoleGuarantee extends AbstractEntity {

	private static final long serialVersionUID = 6106304497345109366L;

	@NotNull
	@Audited
	@ManyToOne(optional = false)
	@JoinColumn(name = "guarantee_id", referencedColumnName = "id")
	@OnDelete(action = OnDeleteAction.CASCADE)
	private IdmIdentity guarantee;

	@NotNull
	@Audited
	@JsonBackReference
	@ManyToOne(optional = false)
	@JoinColumn(name = "role_id", referencedColumnName = "id")<commit_msg>#122 Fix index name in IdmRoleGuarantee<commit_after>package eu.bcvsolutions.idm.core.model.entity;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
import org.hibernate.envers.Audited;

import com.fasterxml.jackson.annotation.JsonBackReference;

import eu.bcvsolutions.idm.core.api.entity.AbstractEntity;

/**
 * Intersection table beetween role and identity - guarantee of role
 * 
 * @author <NAME> <<EMAIL>>
 *
 */

@Entity
@Table(name = "idm_role_guarantee", indexes = {
				@Index(name = "idx_idm_role_guarantee_guarantee", columnList = "guarantee_id"), 
				@Index(name = "idx_idm_role_guarantee_role", columnList = "role_id") } )
public class IdmRoleGuarantee extends AbstractEntity {

	private static final long serialVersionUID = 6106304497345109366L;

	@NotNull
	@Audited
	@ManyToOne(optional = false)
	@JoinColumn(name = "guarantee_id", referencedColumnName = "id")
	@OnDelete(action = OnDeleteAction.CASCADE)
	private IdmIdentity guarantee;

	@NotNull
	@Audited
	@JsonBackReference
	@ManyToOne(optional = false)
	@JoinColumn(name = "role_id", referencedColumnName = "id")
{'fraction_non_alphanumeric': 0.1081386586284853, 'fraction_numerical': 0.01544837980406933, 'mean_word_length': 6.175675675675675, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7156400', 'n_tokens_mistral': 916, 'n_tokens_neox': 851, 'n_words': 166}