Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

How to backpopulate a parent attribute witha composite foreign key with sqlachemy?

I have a parent entity with a composite FK and a child entity with a FK constraint on the parent PK. I've mapped in both a relationship to back populate their references, but getting this error: ...
Iván Pazmiño's user avatar
0 votes
1 answer
39 views

JPA returning same object multiple times instead of expected objects

I have this entity class // package and imports @Entity @IdClass(WorkflowRouteId.class) @Table(name = "workflowroute") @Getter @Setter @NoArgsConstructor @AllArgsConstructor public class ...
Aregism's user avatar
1 vote
1 answer
40 views

One of the Multiple Columns Primary Key is Inferred from another because of ORDER BY request

Context I have a table T with its primary key containing multiple columns: A, B, C, D Use Cases This table may contains millions of rows. And there are two constraints: Reading fast using an ORDER BY ...
Kris's user avatar
  • 491
1 vote
1 answer
133 views

ABAP select with primary key in HANA applying condition to whole primary key

Is there a way to implement a full primary key select? I will explain it in more detail in the following lines. I have to process all records of a table in sequence, using cursors, if the process ends ...
ELORA's user avatar
  • 11
0 votes
0 answers
133 views

How do I use composite primary keys in r2dbcEntity and r2dbcRepository

My mysql table uses two fields as composite primary keys. In SpringBoot, I want to use r2dbcRepository.findById() to query data by composite primary keys. How do I define Entity and Repository? I ...
stillmoon's user avatar
0 votes
1 answer
374 views

Create primary index for primary key in postgres with desc ordering

I have a table with time-series data and with a primary key - actually several large tables but this will do as an example: postgres=# create table foo (x varchar, y varchar, z text, updated ...
Richard Wheeldon's user avatar
0 votes
2 answers
146 views

Type Error while populating a model in Django with UniqueConstraint

I'm trying to build up my first project in Django and I'm having some issues while creating an entry into my model Prevision (including sales forecasts), which has a uniqueConstraint to ensure that ...
grover999's user avatar
  • 303
0 votes
1 answer
160 views

Identifying primary key in basic ERD diagram

I can't figure out the primary key for the Office entity described below. The diagram is for a national honor's society. I included info about the Chapter entity, since I think I have to use it to ...
Maggie's user avatar
  • 1
-1 votes
1 answer
52 views

Create foreign keys to references to other tables and also have matching with mapping table

I'm using SQL Server and setup 4 tables with many references between them CREATE TABLE [dbo].[Message] ( [Id] [BIGINT] PRIMARY KEY IDENTITY (1, 1) NOT NULL, [ConversationId] [...
Ming Hieu's user avatar
  • 311
0 votes
3 answers
93 views

What is the typical method for preventing duplicates in a PostgreSQL table?

Consider the following table, recipe, in a PostgreSQL database. Column Type Collation Nullable Default name text not null date date not null ingredients text[] not null calories integer not null ...
adam's user avatar
  • 11
0 votes
1 answer
38 views

Entity Framework Core: how to get table B which references with table A with 2 composite keys

I'm using EF Core 6 to map my database table to entity classes using DB first. I have table Conversation_Users has a composite primary key made up of 2 columns, which reference 2 other entities (...
Ming Hieu's user avatar
  • 311
1 vote
2 answers
42 views

@IdClass with @Inheritance(strategy = InheritanceType.SINGLE_TABLE)

I use hibernate. I have an abstract class: @Data @Entity @Table(schema = "timesheetdb", name = "project_property") @IdClass(ProjectPropertyPK.class) @Inheritance(strategy = ...
fedyaka's user avatar
  • 11
0 votes
0 answers
38 views

How to update a part of primary key if it is a combination of three columns

I have a table in which I set primary key as combination of three keys like Statudet_log(ID,STudent_ID,Course_ID,Course_Status) STudent_ID,Course_ID,Course_Status all made as composite key (primary ...
Ahmed1212's user avatar
0 votes
1 answer
49 views

One to many relationship with a composite key table

There may be a better way to do this, but here it is I am trying to record shipping prices The elements are shipping zone shipping weight 3 carriers UPS, USPS, FEDEX 7 Zones 2 through 8 Table 1 UID ...
user avatar
-1 votes
1 answer
59 views

Create Key using two columns and do a left join SQL

I have two tables I would to do a left join on. Order: | ID | CATA | Repo | Assc | Return: | ID | CATB | Addl| Sumin| I need to create a Key using ID+CATA on Order table and ID+CATB on Return Table. ...
StackWiz's user avatar

15 30 50 per page
1
2 3 4 5
67