Snippets

Thomas Einwaller composite ID

Created by Thomas Einwaller
Rabatt.get(new Rabatt(rabattId: 12, jahr: 2016))
class Rabatt implements Serializable {

	String rabattId
	int rabattleiste
	int rabattspalteVon
	int rabattspalteBis
	BigDecimal prozentsatz
	int jahr

	static constraints = {
	}

	static mapping = {
		table "Rabatt"
		id composite: ["rabattId", "jahr"]
		rabattId column: "ID"
		rabattleiste column: "Rabattleiste"
		rabattspalteVon column: "Rabattspalte_von"
		rabattspalteBis column: "Rabattspalte_bis"
		prozentsatz column: "Prozentsatz"
		jahr column: "Jahr"
		version false
	}
}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.