Questions tagged [one-to-one]

Refers to the quantity of an entity as a relationship to another entity. Meaning that for every instance of an entity, there is a single related instance of another entity.

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

Meaning that for every instance of an entity, there is a single related instance of another entity.

1496 questions
-1
votes
1 answer

NHibernate unidirectional one-to-one mapping problem

I am trying to create a Unidirectional one-to-one relationship using NHibernate. Example: An Order is given by a Customer. Customer{ID, Name, Address} OrderN{ID, Customer, OrderDate} Here, OrderN.Customer-field is intended to store Customer.ID as…
user366312
  • 16,949
  • 65
  • 235
  • 452
-1
votes
1 answer

Hibernate multiple relationships doesn't work

When I create 2 one-to-one relationships in the end only one of the 2 is saved the other one becomes null. In the sql trace you can see MFUITVOERINGJOIN only saves 2 id's when it should be saving 3 :S Is there something wrong…
Jelle Breuer
  • 25
  • 1
  • 8
-1
votes
1 answer

Hibernate Criteria Return parent record that have one-to-one child record not null?

Possible Duplicate: Hibernate Criteria Return parent record that have one-to-one child record not null? All in the title, i have two classe Parent and child related with one-to-one relation (Parent my have one child max), I want to create…
user820688
  • 719
  • 2
  • 13
  • 27
-1
votes
1 answer

Create and populate child table from Parent table using Hibernate Annotation

I need to create a table EMPLOYEE_REMARK from a table EMPLOYEE. And need to do it with Annotation Hibernate. EMPLOYEE EMP_ID, EMP_FNAME, EMP_LNAME EMPLOYEE_REMARK EMP_REMARK_ID, EMP_ID, REMARK it will be a OnetoOne relationship i.e, for each…
saptarshi
  • 97
  • 1
  • 14
-1
votes
2 answers

SQLite JOIN two tables with duplicated keys

I need to join two tables on two different fields. I have table 1 like this: key productid customer 1 100 jhon 2 109 paul 3 100 john And table 2 has same fields but aditional data I must relate to first table key …
ruhalde
  • 3,521
  • 3
  • 24
  • 28
-2
votes
1 answer

How to create and insert into a table in SQL entity that has two mutually exclusive 1:1 relations?

How do I handle the code for creating these tables and inserting into them? Tried this but failed : create table vlasnik ( vlasnik_id integer not null constraint vlasnik_pk primary key, datum_zakupa date not null ); create table…
Matea_my
  • 43
  • 6
-2
votes
2 answers

Laravel One To One Relationship With Custom Foreign Key NOT WORKING

I'm working with Laravel v10 and I have a users table and each user has also another record at the members table. So in order to set up the One To One Relationship between these two Models: User Model: public function member() { return…
Pouya
  • 114
  • 1
  • 8
  • 36
-2
votes
2 answers

T-SQL query to fetch all database relations and relation multiplicity type

I need a T-SQL query to fetch all relations in a SQL Server database and understand that each relation is of multiple order like one-to-one, one-to-many and many-to-many relation. I can fetch all relation's but can't know each relation is…
-2
votes
1 answer

Laravel creates a one-to-many relationship instead of one-to-one

When I create a one-to-one relationship migration, laravel creates a one-to-many relationship. I tried to solve this in different ways and nothing worked. How can I solve this? Company: class Company extends Model { public function user() { …
-2
votes
1 answer

I not understand this code and dont know how to use it?

I took the code from the tutorial, and I need a professional look and description step by step views.py @login_required @transaction.atomic def update_profile(request): if request.method == 'POST': user_form =…
-4
votes
2 answers

How create entity. Hibernate

Each company has two properties, they are company name and estimated annual earnings. There are two types of companies: 1- Main company, 2 - Subsidiary company. The company can belong only to one company but can have a few child companies.
Vitaliy Denys
  • 43
  • 1
  • 9
1 2 3
99
100