19,541 questions
0
votes
0
answers
17
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
31
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 ...
1
vote
0
answers
34
views
Beego ORM `rel(fk)` field causes panic in `getColumnTyp()` when running RunSyncdb
I am trying to define a foreign key field in a Beego ORM model, but the application crashes during RunSyncdb with the following panic:
panic: runtime error: invalid memory address or nil pointer ...
4
votes
1
answer
102
views
How to aggregate hierarchical data efficiently in Django without causing N+1 queries?
I’m working with a hierarchical model structure in Django, where each level can represent a region, district, or village. The structure looks like this:
class Location(models.Model):
name = models....
0
votes
1
answer
85
views
selectinload(A,B) vs selectinload(A).selectinload(B)
I'm working on a project using SQLAlchemy with lazy='raise' set on relationships to prevent implicit lazy loading. I'm trying to understand the real difference between these two forms of eager loading:...
1
vote
1
answer
38
views
How can I automatically add user's info to a model in Django?
I have a status and user apps in my project and all the statuses are obviously created by particular users. I want to keep info about statuses creators (id) in my db, but I don't know how to add it ...
0
votes
0
answers
56
views
How to suppress redundant update in Hibernate when insert + update happen in same transaction (trigger firing twice)?
In my Jakarta EE application (EJB + JPA with Hibernate), I have the following scenario:
A Contact entity is created (INSERT).
Immediately after creation, for some business reason, the same entity is ...
0
votes
0
answers
56
views
Larave 12 skip and delete related model does to work as inteded [duplicate]
In my Laravel 12 application. This code deletes entire set of logs (related to that app) without skipping:
$app->logs()->orderBy('timestamp_ms', 'desc')->skip(2)->delete();
While this ...
0
votes
0
answers
59
views
Hibernate ORM 7.1.0
I never used check in the project, but I’m facing this problem with Hibernate 7.1.0.
With Hibernate 6.4.4, everything works fine.
Caused by: org.hibernate.models.UnknownAnnotationAttributeException:
...
0
votes
0
answers
39
views
MS SQL Server from Cot framework of Rust is posible?
are there any possibility to connect with MS SQL Server from Cot framework of Rust?
I think it could be switched the SeaQuery from SeaORM to SeaORMx..
The ORM's functions could be more scalable with ...
0
votes
0
answers
56
views
How to infer model type from plain schema in Sequelize?
In Sequelize, I've the following schema:
const User = sequelize.define('User', {
name: DataTypes.STRING,
email: DataTypes.STRING,
})
But in TS, User ends up being typed as ModelCtor<Model<...
0
votes
1
answer
69
views
Is there a way to interrupt entity update by throwing exception from @PrePersist and @PreUpdate?
I'm looking into JavaDoc of @javax.persistence.PreUpdate and @javax.persistence.PrePersist and there isn't any notice about whether entity persist or update flow will be interrupted when an exception ...
3
votes
0
answers
32
views
Does peewee ORM have a native way to include table/columns descriptions/comments?
Does peewee ORM have a native way to include table/columns descriptions/comments?
If not, what would be the preferred way to add comments to db objects?
Thank you for your help.
2
votes
1
answer
73
views
Why is Yii ORM findAll returning the last element from the set?
I'm using Yii1 ORM and I struggled for two hours to figure out an issue with findAll. First, let's see a raw query:
select * from lime_group_l10ns where gid in (232, 234);
this yields:
+------+-----+-...
2
votes
1
answer
104
views
How to use two different expressions in one filter in Diesel ORM?
I am trying to run a very simple filter on a joined table using Diesel ORM.
The database has a simple many-to-many relationship set up using an associative table:
CREATE TABLE items (
id INT NOT ...
1
vote
1
answer
137
views
Ent ORM query with computed fields
I'm using Ent ORM and need help with a simple issue.
I run a query like:
SELECT id, first_name, last_name, first_name || ' ' || last_name AS fullname
FROM users
ORDER BY fullname
Since fullname ...
0
votes
0
answers
21
views
How to handle constraint errors like unique or not null from DB in Django [duplicate]
I have a write operation which adds a record in rider model. The rider_code is unique in this. Now 1 way is to first check if any record with that rider_code exists then return error else create rider....
0
votes
1
answer
46
views
JPA many to many relation always updates the one side
I have a many to many relationship in JPA
a MailItem can belong to multiple Subscription and a Subscription can contain multiple MailItem. I have an intermediate SubscriptionMailItem table where I ...
1
vote
1
answer
65
views
Optimizing SQLAlchemy Flush: Intercepting INSERTs for Batched Multi-Row Execution in MySQL
Is there a way to monkeypatch SQLAlchemy in a way that intercepts all INSERT INTO statements generated during a session.flush() without sending them to the database? Instead, I want to capture these ...
0
votes
0
answers
33
views
How to use @SecondaryTable with custom @ForeignKey name in JPA?
I'm trying to use @SecondaryTable in a JPA entity and want to explicitly set the name of the foreign key constraint between the primary and secondary table.
Here is a simplified version of my entity:
...
1
vote
2
answers
135
views
Error while trying to use Nette framework with Nextras/ORM package - model object injected to a handler is always null
I have worked with most of existing PHP frameworks, but this is the first time I am working with Nette and unfortunately I can't make something which sounded like an easy task to work.
How SHOULD it ...
0
votes
1
answer
34
views
Hibernate xml mapping and kotlin immutable class
I have multi-module spring project and some classes are like third party must be be mapped as external. So i used xml mapping, example classes:
data class GeoLocationEntity(
val id: GeoLocationId,
...
0
votes
0
answers
61
views
Using circular generics in Hibernate
I have books and movies that are stored in the regarding shelfs: "book shelf" and "movie shelf".
Abstract Shelf<T>:
@Entity
@Inheritance(strategy = InheritanceType....
0
votes
0
answers
46
views
Prisma ORM can't migrate seperated schema files
currently im dealing with prisma with nodejs .
I'm using prisma version v6.7, and as the author stated this version already supported the mutli schema function.
I followed all the instruction, created ...
0
votes
0
answers
185
views
Spanner error while updating data into a JSON column
I am working with the GCP Spanner database using the sqlalchemy ORM. This is the table schema where I am trying to insert/update (based on a check) data into a JSON column:
from sqlalchemy import ...