Questions tagged [orm]

Object-relational mapping (ORM) is a technique for mapping object-oriented systems to relational databases.

Filter by
Sorted by
Tagged with
0
votes
0answers
20 views

Django model manager improvments

I'm trying to get a computed field at my Project model. It should calculate all foreign key data specific field. At first, I created a model property with a ...
7
votes
3answers
233 views

Unit testing a REST API in Go

I am learning Go by writing a simple CRUD REST API using gotilla/mux and Gorm. I would like to get some feedback on the application code and on unit tests in particular. Please suggest me what to ...
1
vote
0answers
2k views

Proper way to map Entities to DTOs in TypeScript

In a recent project my backend architecture consists of Repositories (talking to database) Services (handling business logic) <...
3
votes
0answers
236 views

GUI to control a NZXT cooling and lighting system

I am working since a couple of weeks on my first Python application and I would love to have a review of the code I wrote so far. The app has the purpose of controlling the cooling and lighting of an ...
1
vote
0answers
53 views

Displaying a user profile based on a mock ORM

Overview We are learning PHP OOP and decided to create a simple app with 3 database tables, one a basic users table, the other two containing information about the users' favorite food and favorite ...
2
votes
1answer
279 views

Password field based on peewee ORM framework

I implemented a password field based on the peewee framework to handle passwords of accounts in web applications for Python 3.4. My goals were Secure hashing. No plain password leakage. Easy ...
0
votes
1answer
36 views

Is using beforeFind() event in background to dynamic update SQL queries a good practice? [closed]

I have a Projects table, which I need to ORDER BY code column. But problem is ...
3
votes
0answers
281 views

Flask-SQLAlchemy model structure

I'm seeking a review of my Flask-SQLAlchemy model structure, particularly adherence to DB best practices, such as avoiding duplication, etc. The models represent the relations between Departments, ...
5
votes
0answers
899 views

Implementing an enum field for peewee.Model

I implemented an enum field class EnumField inheriting from peewee.CharField. The reason that I use a character-based field is ...
3
votes
0answers
649 views

Implementing a JSON-serializable ORM model

I implemented a library which, amongst other things, implements a JSON-serializable ORM model based on the peewee framework. Here's the relevant excerpt: ...
6
votes
2answers
4k views

Building a simple ORM in PHP

I have been curious about how ORMs really work under the hood so I decided to do something simple in PHP. So I basically built two Interfaces: DatabaseInterface and the ORMMapper interface and two ...
5
votes
3answers
2k views

A demonstrational example of a Data mapper ORM

I want to create an educational example of a Data mapper type ORM. You know, it is always interesting to know how the stuff works, but when you take a fully functional software package, it's just ...