19,515 questions
1
vote
1
answer
82
views
How to handle foreign key constraint error when deleting a user in Prisma (one-to-many relation)?
I'm building an Express + Prisma API for a blog system.
I have a User model and a Post model with a one-to-many relationship (one user can have many posts).
When I try to delete a user using:
await ...
0
votes
0
answers
36
views
SQLAlchemy create_all() does not add new columns to existing SQLite tables [duplicate]
I added a new column to an existing SQLAlchemy ORM model in an SQLite-backed application.
My model:
class User(Base):
__tablename__ = "users"
id = Column(String(36), primary_key=True)...
0
votes
2
answers
124
views
MongoDb mongoTemplate for multiple databases
I have 2 databases:
test: contains a collection called people which holds documents representing the Person and Author class
test2: contains a collection called somethingElse which holds documents ...
Advice
0
votes
4
replies
115
views
DDD Aggregate Roots: How to avoid loading unused child entities without tightly coupling to the ORM?
I am implementing Domain-Driven Design (DDD) and facing a problem: balancing database performance with clean domain modeling.
I want to stop loading child entities that I don't need when getting an ...
3
votes
1
answer
171
views
How to make tables with relationships in SQLAlchemy in different files
I have many-to-many connection in my database and trying to make tables with ORM. Now I have 3 tables (one is secondary)
class TableA(Base):
__tablename__ = "tablea"
id: Mapped[int] =...
0
votes
1
answer
94
views
Can this query be expressed in Django?
I have the following set of models (simplified and renamed for the purpose of this question). A lot of other functionality has already been built on top of them so wholesale changes aren't possible, ...
0
votes
0
answers
45
views
Multiset for many to many relation in sqlalchemy using an associative table
I have a situation where I have 2 tables with a many to many relationship
class Book(MyBaseClass):
book_id: Mapped[int] = mapped_column(primary_key=true)
words: Mapped[List[Word]]
class Word(...
-1
votes
1
answer
136
views
LINQ to SQL mapping a SQL Server uniqueidentifier to a Guid [closed]
I am trying to access a SQL Server uniqueidentifier using Linq-to-SQL mapping:
Table -
CREATE TABLE [dbo].[Members](
[guid] [uniqueidentifier] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
...
1
vote
1
answer
156
views
SQLAlchemy failing when querying an empty table in DB2
I have a table in my DB2 database with information about customer locations. Each location has a unique id (WLC = worklocation code).
I am trying to run a query in Python using SQLAlchemy to retrieve ...
1
vote
0
answers
80
views
new client does not track new changes after being generated - prisma v7
performed all changes as per https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-7
except adding a driver-adapter since im using a transaction-pooler connection ...
1
vote
1
answer
969
views
Prisma V7 Error: Client Password must be a string
I am sorry if it's asked already, I just migrated to Prisma V7 and am stuck with an unsolvable error.
SCRAM-SERVER-FIRST-MESSAGE: client password must be a string
The server runs fine, Though the ...
0
votes
1
answer
112
views
Java OOP association SQL equivalent
I have two classes: Student and Group.
Student attributes:
private String registrationNumber;
private String firstName;
private String lastName;
private Date dateOfBirth;
private String password;
...
4
votes
4
answers
6k
views
Stuck with Prisma error after updating to v7
I was working with Prisma and NestJS and it is fine but when I updated Prisma to version 7 I started getting errors, fixed them, but I am stuck with this one.
Part of schema:
datasource db {
...
0
votes
0
answers
43
views
org.hibernate.query.sqm.UnknownEntityException: Could not resolve entity class after upgrading to hibernate 6.6
I have a test case that tests all the DAOs in my project. It uses openpojo to get the list of all DAO classes. The test case then iterates over the list of DAO classes and invokes all methods in them ...
1
vote
0
answers
81
views
WaveMaker 9.4 to 10.6.6 Migration: Type Mismatch Errors (Integer to BigInteger) in Generated Java Code
Problem Summary
I'm attempting to migrate a WaveMaker project from version 9.4 to 10.6.6 and encountering persistent compilation errors related to type mismatches between Integer and BigInteger in the ...