All Questions
311
questions
0
votes
1
answer
178
views
Error when inserting user with Enum role into PostgreSQL database
I am encountering an issue when attempting to insert a new user with a role into my PostgreSQL database. I have a Spring Boot application where users are represented by a UserEntity class, and each ...
3
votes
0
answers
54
views
Polymorphic select query in SQLAlchemy
There are following tables:
message_table = Table(
"message",
metadata,
# attributes
Column("message_id", INTEGER, primary_key=True),
Column("chat_id",...
2
votes
2
answers
86
views
How to use mapping method of base class for derived class?
Imagine I have the following in python (actual language does not really matter, since I have the problem in other languagues like php too. A base class "CarModel" and a derived class "...
0
votes
1
answer
429
views
Parent-Child relationship problem with mapstruct and hibernate when the child is changed
In a REST API project using Jakarta JAX-RS, we use mapstruct to map DTO to Hibernate entities, and we are encountering a problem with parent-child relationships.
Let's call two classes Parent and ...
1
vote
1
answer
46
views
Problem mapping Fluent NHibernate One-To-Many
I am having issues mapping two classes to a database via Fluent NHibernate.
My classes are Asset and LogData.
Asset has a bunch of decimal configuration values, and a Log which is a LogData.
public ...
0
votes
1
answer
156
views
ORM: EclipseLink AssociationOverride "Persistent type of override attribute cannot be resolved"
I am building an application that has a database of students, courses, and it also keeps track of all the courses that each student is taking,
I have an entity for Course and Student, and they have a ...
1
vote
0
answers
107
views
Database relations & OOP - Egg and chicken problem
These are my tables:
users
-----------------
| id | username |
-----------------
| 1 | stepha.. |
| 2 | sophia |
-----------------
projects
---------------------------------------
| id | ...
0
votes
0
answers
156
views
C# - How instantiate a class from database at runtime
Scenario: I have the following table in a SQL Server database that is used by different modules of the entire system (so it must remain as it is and where it is):
id
field1
field2
1
val1
val2
2
...
0
votes
1
answer
269
views
MappingException - The class 'generalBundle\Entity\xxx' was not found in the chain configured namespaces xxx - Upgrade to symfony flex
I have a project in Symfony 3.4 and I am configuring flex, to later go to version 4.4.
I have already managed to modify the project folder structure, and it is trying to map, but the problem is that ...
-1
votes
1
answer
444
views
Spring Boot: ManyToOne relation with @JoinColumn keeps the foreign key null
https://www.baeldung.com/jpa-joincolumn-vs-mappedby
followed the same approach for creating oneToMany & ManyToOne relation mapping.
Even though used the @JoinColumn in owning side entity, as per &...
0
votes
1
answer
68
views
EF doesn't assign new ID to model
I have an app with Entities, where every user has an Inventory object
public class BattlegroundUser : IdentityUser
{
[Required]
public Inventory Inventory { get; set; } = new ...
0
votes
1
answer
73
views
Many To Many Relationship JPA with Entity
I have an issue trying to generate multiple relationship in JPA with three Entities.
Order
Product
Modifier
I have an Entity to handle the relationship many to many.
OrderProducts (order_id and ...
0
votes
1
answer
800
views
Doctrine|ORM|Symfony: Is possible relation to Interface or multiple entities
Simple example:
I've got two users Admin and Client (both implements UserInterface) and Cart - three entity classes at a. Admin and Client can have his own carts. How to configure/resolve Cart entity ...
0
votes
1
answer
46
views
Entity Framework 6 - using a class with three tables (Db first)
I'm working with Entity Framework 6.
I have three tables in my database:
Payments
Payments_temp
Payments_error
Payments has these columns:
Id
Amount
Json
The other two tables have the same columns,...
0
votes
0
answers
178
views
SQLAlchemy IntegrityError Relationship using object already in the database
This is my model, made with classical mapping, classes A and B are working accordingly
import sqlalchemy as sa
from sqlalchemy.orm import mapper, relationship
from domain.a import A
from domain.b ...