/* * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.test.naturalid.mutable.cached; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToOne; import org.hibernate.annotations.NaturalId; import org.hibernate.annotations.NaturalIdCache; /** * @author Guenther Demetz */ @Entity @NaturalIdCache public class B { @Id @GeneratedValue(strategy = GenerationType.TABLE) public long oid; @ManyToOne @NaturalId(mutable = true) public A assA = null; @NaturalId(mutable = true) public int naturalid; }