Top "One-to-one" questions

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

Rails one-to-one relationship

I have the following: class User < ActiveRecord::Base has_one :car, :class_name => 'Car', :foreign_key => 'user_…

ruby-on-rails ruby one-to-one
Hibernate one-to-one mapping with a reference column (XML mapping)

I have a user table and a user_detail table with one to one mapping user_detail table have a …

java database hibernate one-to-one
@OneToOne and @JoinColumn, auto delete null entity , doable?

I have two Entities , with the following JPA annotations : @Entity @Table(name = "Owner") public class Owner implements Serializable { @Id @GeneratedValue(…

hibernate orm jpa one-to-one
Hibernate: @ManyToOne(fetch = FetchType.LAZY) does not work on non-primary key referenced column

I have 2 tables: Order [OrderId(PK), OrderShipmentCode, ...] and Shipment[ShipmentId(PK), ShipmentCode, ...]. In Order class, I declared shipment field as …

java hibernate jpa lazy-loading one-to-one
Deciding on foreign key while implementing one to one relationship in MySQL

I have two simple tables "items" and "orders". For the sake of simplicity lets assume that one item can only …

mysql database database-design entity-relationship one-to-one
Hibernate - bidirectional @OneToOne

I have 2 classes: User and UserPicture which have a 1:1 relationship. public class User { @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name="…

hibernate one-to-one
AspNetUsers' ID as Foreign key in separate table, one-to-one relationship

I have looked up and down, tried all the different and various ways of being able to store a foreign …

c# asp.net database entity-framework one-to-one
Whats the difference between a OneToOne, ManyToMany, and a ForeignKey Field in Django?

I'm having a little difficulty getting my head around relationships in Django models. Could someone explain what the difference is …

python django many-to-many foreign-key-relationship one-to-one
Django Admin: How to display value of fields with list_display from two models which are in oneToOne relation?

I belive that the answer to my problem is simple, but I can't find it anywhere. Here is my predicament. …

django admin models one-to-one
NHibernate one-to-one mapping where second table data can be null

I have an existing database with the table Transactions in it. I have added a new table called TransactionSequence where …

nhibernate one-to-one