package io.pivotal.cdm.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class SanitizationScript {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	long id;

	private String script;

	protected SanitizationScript() {
	}

	public SanitizationScript(final String script) {
		this.setScript(script);
	}

	public String getScript() {
		return script;
	}

	public void setScript(String script) {
		this.script = script;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}
}

package io.pivotal.cdm.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class SanitizationScript {

	final static long ID = 1;
	
	@Id
	long id = ID;

	private String script;

	protected SanitizationScript() {
	}

	public SanitizationScript(final String script) {
		this.setScript(script);
	}

	public String getScript() {
		return script;
	}

	public void setScript(String script) {
		this.script = script;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}
}

Fix bug saving script more than once
Fix bug saving script more than once
