Top "One-to-one" questions

Refers to the quantity of an entity as a relationship to another entity.

How to Create a real one-to-one relationship in SQL Server

I have two tables tableA and tableB, I set tableB's primary key as foreign key which references tableA's primary. But …

sql sql-server entity-framework one-to-one
How can I make a JPA OneToOne relation lazy

In this application we are developing, we noticed that a view was particularly slow. I profiled the view and noticed …

java hibernate jpa lazy-loading one-to-one
One to one optional relationship using Entity Framework Fluent API

We want to use one to one optional relationship using Entity Framework Code First. We have two entities. public class …

c# entity-framework ef-code-first one-to-one ef-fluent-api
Java: Hibernate @OneToOne mapping

I'm trying to get Hibernate @OneToOne annotations working and not having much success here... Let's say I've got a table …

java hibernate jpa one-to-one hibernate-annotations
MySQL - One To One Relationship?

I'm trying to achieve a "One to one" relationship in a MySQL database. For example, let's say I have a …

mysql sql database database-design one-to-one
Hibernate : attempted to assign id from null one-to-one property: employee

This is my Database structure, One-to-One mapping in MySQL: This is my java file: public class Employee { private EmployeeDetail empdetail; …

hibernate exception one-to-one
Hibernate: one-to-one lazy loading, optional = false

I faced the problem that one-to-one lazy loading doesn't work in hibernate. I've already solved it, but still don't properly …

hibernate jpa lazy-loading one-to-one
JPA @OneToOne with Shared ID -- Can I do this Better?

I’m working with an existing schema that I’d rather not change. The schema has a one-to-one relationship between …

java jpa one-to-one
Is there ever a time where using a database 1:1 relationship makes sense?

I was thinking the other day on normalization, and it occurred to me, I cannot think of a time where …

sql database-design one-to-one database-normalization
How to declare one to one relationship using Entity Framework 4 Code First (POCO)

How to declare a one to one relationship using Entity Framework 4 Code First (POCO)? I found this question (one-to-one relationships …

c# entity-framework ef-code-first poco one-to-one