# OneToOne relationship in Hibernate 6

**URL:** https://discourse.hibernate.org/t/onetoone-relationship-in-hibernate-6/8962
**Category:** Hibernate ORM
**Created:** [February 2, 2024, 12:00pm UTC](https://discourse.hibernate.org/t/onetoone-relationship-in-hibernate-6/8962 "2024-02-02T12:00:37Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Zuka](https://avatars.discourse-cdn.com/v4/letter/z/6f9a4e/32.png) [@Zuka](https://discourse.hibernate.org/u/Zuka)
#### Post date: [February 5, 2024, 12:23pm UTC](https://discourse.hibernate.org/t/onetoone-relationship-in-hibernate-6/8962/6 "2024-02-05T12:23:06Z")

</div>

Done

> [@HIbernate ORM UserType mapping](https://discourse.hibernate.org/t/hibernate-orm-usertype-mapping/8973):
>
> Hello, how can i join on UserType objects with jpql ? in hibernate 5 it worked fine , but on hibernate 6 it throws error : Caused by: java.lang.IllegalArgumentException: Can’t compare test expression of type [BasicSqmPathSource(foo: Foo.class)] with element of type [BasicSqmPathSource(id : Long)] this is my entity representation public class A { @Id @Column(name = "ID") private long id; @Column(name = "FOO") @Type(value = com.example.foo.FooUserType.class) private Foo foo; //getters and…

---

_[View the full topic](https://discourse.hibernate.org/t/onetoone-relationship-in-hibernate-6/8962)._
