これは私のために働いているものです(計装なしで):
@OneToOne両側で使用する代わりに@OneToMany、関係の逆の部分(との関係mappedBy)で使用します。これにより、プロパティはコレクションになりますが(List以下の例)、ゲッター内のアイテムに変換して、クライアントに対して透過的にします。
このセットアップは遅延して機能します。つまり、selectは、getPrevious()またはgetNext()が呼び出されたときにのみ行われ、呼び出しごとに1つだけ選択されます。
テーブル構造:
CREATE TABLE `TB_ISSUE` (
    `ID`            INT(9) NOT NULL AUTO_INCREMENT,
    `NAME`          VARCHAR(255) NULL,
    `PREVIOUS`      DECIMAL(9,2) NULL
    CONSTRAINT `PK_ISSUE` PRIMARY KEY (`ID`)
);
ALTER TABLE `TB_ISSUE` ADD CONSTRAINT `FK_ISSUE_ISSUE_PREVIOUS`
                 FOREIGN KEY (`PREVIOUS`) REFERENCES `TB_ISSUE` (`ID`);
クラス:
@Entity
@Table(name = "TB_ISSUE") 
public class Issue {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    protected Integer id;
    @Column
    private String name;
    @OneToOne(fetch=FetchType.LAZY)  // one to one, as expected
    @JoinColumn(name="previous")
    private Issue previous;
    // use @OneToMany instead of @OneToOne to "fake" the lazy loading
    @OneToMany(mappedBy="previous", fetch=FetchType.LAZY)
    // notice the type isnt Issue, but a collection (that will have 0 or 1 items)
    private List<Issue> next;
    public Integer getId() { return id; }
    public String getName() { return name; }
    public Issue getPrevious() { return previous; }
    // in the getter, transform the collection into an Issue for the clients
    public Issue getNext() { return next.isEmpty() ? null : next.get(0); }
}
               
              
one-to-oneような式でa を使用しselect other_entity.id from other_entity where id = other_entity.idます。もちろん、これはクエリのパフォーマンスには理想的ではありません。