Most voted "orm" questions
Object-Relational Mapping (ORM) or object-relational mapping is a technique of mapping between object-oriented systems and relational databases.
Learn more…93 questions
Sort by count of
-
41
votes4
answers4635
viewsTo what extent is it not advisable to use an ORM?
I am working on a very large system using . NET (ASP.NET MVC) the application requires a critical level of performance. How worthwhile or not to use a ORM? Is there a tool that I can compare in…
sql entity-framework software-engineering nhibernate ormasked 10 years, 6 months ago Tuyoshi Vinicius 4,046 -
23
votes2
answers5722
viewsWhat’s wrong with the N+1?
Whenever we work with some ORM, it is common to fall into the problem of darlings N+1. It’s something about performance, called even antipattern. But what is really this problem, why it happens,…
-
16
votes1
answer4185
viewsWhat is the difference between the Data Mapper and Active Record Patterns?
I would like to know the main differences between these two Patterns design. I have this question because when I heard the news about Cakephp 3.0 I saw the change of the Pattern design used by the…
-
15
votes2
answers1101
viewsEntity Framework Core x Entity Framework 7
What are the main differences between Entity Framework Core and Entity Framework 7? There are scenarios where one is more suitable than the other. It’s so much version and so much name change that…
-
11
votes2
answers2459
viewsCriteria API - Hibernate vs JPA 2
I will try to phrase this question in the least opinionated way possible in the spirit of stackoverflow in English. For a new project I need to make the decision between using the JPA 2 or Hibernate…
-
11
votes3
answers1813
viewsHow to map 1:N (one to many) in Dapper?
I’m using the Dapper which is a micro ORM used to map objects according to the database tables following the relational model. Therefore, I have some doubts regarding the mapping and the structure…
-
9
votes2
answers960
viewsHow to save a cascade collection in nhibernate without putting circular reference?
Always when I try to save an object with a data collection mapped as HasMany I have to put a circular reference so that Nhibernate can save this object in cascade. For example I have the following…
-
9
votes3
answers3574
viewsWhat are the functions of an ORM?
What actions a ORM should supply? What it should or should not provide to the developer, or what its role within a system?
-
9
votes1
answer422
viewsObject-relational impedance difference
Basic questioning about Object-Relational impedance Mismatch, a topic I have little experience with. It really exists? (I’m sure you do; Martin Fowler and Ted Neward already talked about the…
-
7
votes2
answers1363
viewsWhat is the relationship between JPA and ORM?
I wanted to know the relationship between JPA and ORM because I was in doubt, if both ,.
-
7
votes1
answer161
viewsEdgejs and Entity Framework
Next, I am learning Nodejs and I am delighted with the same, however I found my first stone on the way, access to relational database using some ORM (precisely to access Postgresql). Initially I…
-
6
votes2
answers3589
viewsEntity Framework 6 does not create database
I created a c# WEB MVC5 project in visual studio 2013, installed Entity framework 6 and created my classes("entities") as well as Dbcontext with the respective Dbsets. Inside the WEB.Config I set up…
asp.net-mvc-5 entity-framework entity-framework-6 ormasked 9 years, 11 months ago Cleiton Ribeiro 757 -
5
votes1
answer181
viewsPython ORM similar to Django
I studied the framework for a long time Django and I thought the ORM of the same was excellent. I had the idea, at some point, to build an application with another framework called Flask, using a…
-
5
votes2
answers200
viewsWhat’s the opposite of . equals in C#?
I’m doing a left Join where I want to pick up just what’s on the left table and there’s no right one. I’m using LINQ and Entityframework. I made a code that takes the similarities, follows below:…
-
4
votes2
answers4977
viewsUsing the JPA repository
Last Saturday I presented my TCC in college and saw that I need to improve the presented project. The system receives tax notes in format XML and manipulates them. I based the system on the company…
-
4
votes2
answers632
viewsAlternative to JPA Implementation
I am using JPA in a project, with the Hibernate implementation, still using Java 7. And constantly Permgen runs out of space. I know it’s because of Hibernate, how new I am in this java technology.…
-
4
votes2
answers1159
viewsHow to make a "LIKE" in a DJANGO ORM query?
To make a query to get the data accurately in Django, I use the filter, thus: usuarios = Usuarios.objects.filter(nome='Jonh') This will generate an SQL similar to: SELECT * FROM usuarios wHERE nome…
-
4
votes2
answers3140
views -
4
votes3
answers858
viewsHow to make a Union of two queries using Django Filter
I was racking my brain to do union of two darlings using Django Filter and I ended up doing it on hand (Model.objects.raw("SELECT....")). How could I union with Django’s ORM? Note: I have 2…
-
3
votes1
answer395
viewsIs there any way to use Laravel Eloquent in the Silex microframework?
I’m refactoring a website structure and moving on to the Silex microframework. I wonder if there is any way to use the Laravel Eloquent ORM, to connect with the database. I read in the documentation…
-
3
votes2
answers2281
viewsSave a foreign key entity with Hibernate 4
I’m starting to study Hibernate and I’d like to know what the method of saving an entity with a foreign key looks like. The following is an example of two entities: Pupil: @Entity(name = "aluno")…
-
3
votes1
answer104
viewsDealing with nested objects (nesting) using a ORM
Let’s assume that in a system for a bus company I have entities: Line, car and travel. Each one has three classes: The entity itself, class Linha extends Model { protected $id; // outras…
-
3
votes1
answer174
viewsSql Server Stored Procedures
I am starting the development of an application, basically it is a managerial control of companies. The application will issue NFC-e, Nfe, control stock, finance and etc, the database will be hosted…
-
3
votes1
answer191
viewsHow to show data from two tables in c#?
I built a webservice in c#. With a table it was easy to display but what if I have two tables how would it look for me to display this data? I did so it’s the easiest way: [WebMethod] public String…
-
2
votes2
answers637
viewsHow to insert values from a Select field into the database
I’m a beginner in Ruby on Rails and need to add a Select field to the user registration form, so I can add a "Type" for the user to be registered. I intend to populate the fields automatically while…
-
2
votes1
answer861
viewsDoctrine 2 - Does not recognize class mapped with $entityManager->getRepository()
Personal iae... In my file bootstrap.php I am trying to take the repository of a certain entity and gives Fatal Error, informing that the Class does not exist, but it does exist. Here is the error…
-
2
votes1
answer49
viewsPersistence with Doctrine does not take Object data to Insert
I started a new PHP project where every database has tables and their columns with different class names and attributes. With the intention of winning in the productivity of not being renamed I…
-
2
votes1
answer69
viewsActivejdbc Compound Validation
I need to do a composite validation on the Activejdbc ORM and I’m not finding anything in the documentation. Something like, extends from the Validatoradapter class, but I’m not finding material to…
-
2
votes1
answer54
viewsSearch for random objects using conditions
I want to seek for example 10 random people of the same party I did as follows, but this selecting people from all parties, what can be done? = D class Pessoa < ActiveRecord::Base class <<…
-
2
votes2
answers1415
viewsLaravel - Update all fields from a large table
I have the following problem... I am migrating a system, and in the same I own a client table This table has a field called "cli_password", in which the customer’s password To use Laravel…
-
2
votes2
answers146
viewsMapping a List<long> in LINQ to SQL - Windows Phone 7.1
Problem I’m starting an application for Windows Phone 7.1, and I’m implementing the database, only I came across a situation that I couldn’t find any example of similar situation to try to solve,…
-
2
votes1
answer148
viewsDevelopment without EF ORM
It is valid the development without ORM, because today I want to develop an ERP, but I have no knowledge in any framework, is it valid I do everything in hand? I will have the same result? Because I…
-
2
votes0
answers262
viewsHow to create a custom model field by inheriting Foreignkey in Django?
I’m looking to build a custom model field that behaves like Foreignkey, only with a few additional details. This custom field will automatically register a document, passing as reference the model…
-
2
votes1
answer1102
viewsFluent Nhibernate - Composite Key Mapping
Greetings, I’m having a hard time and I can’t fix it. I have an application where I created the mapping and everything was working perfectly, but now I need to change it and that’s where the problem…
-
2
votes2
answers87
viewsHow do Orms, like Active Record, generate SQL code?
I’d like to know how Orms in ruby transform a proc/lambda like this: { (id > 1) & (created_at < Time.now) } in something like " id > 1 and created_at < '2018-01-25' ".…
-
2
votes1
answer467
viewsDjango and Oracle database (accessing your views via ORM)
Hello, despite the title self explanatory. I will detail my doubt to follow. I have a pre-existing Oracle database, integrated it with Django by configuring the default connection in Settings and…
-
2
votes1
answer436
viewsSymfony Single id is not allowed on Composite Primary key in Entity
I have a view, where Mapeei 3 fields as primary key and 2 of these fields are foreign keys As below: /** * @var NotaFiscal * @ORM\Id * @ORM\ManyToOne(targetEntity="NotaFiscal", inversedBy="itens") *…
-
2
votes2
answers45
viewsProblems with Join Laravel ORM
Hello, I’m trying to create an advanced query, but I’m having some problems following the code for analysis! Anuncio::join('users', function ($users) use ($request){ $users->on('users.id' , '=',…
-
2
votes1
answer44
viewsDjango model mapping problem
The relationship between the classes in the Models.py file does not work because of the order of the classes (I think it has more to do with the interpreter) follows the problem: class…
-
2
votes1
answer138
viewsMultiply column with Manytomany Count() from the same Model Django
I have a model called Notificacoes and it has the following structure: Notificacoes(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL) users_interacting =…
-
1
votes1
answer805
viewsModel layer with DAO classes
Work with an MVC application that can be considered large or at least average, as it involves hundreds of features and more than 400 Mysql database tables. As a ORM tool we adopted Doctrine through…
-
1
votes1
answer509
viewsHow to fetch data from another entity using Doctrine 2
I have two entities a Product (id, id_category, name) and another Category (id, name), in the product entity I want to bring the category name by the product table id_category. There is a way to do…
-
1
votes1
answer114
viewsData insertion with PHP OO (Similar to Entitymanager.persist (Object) java manager)
I would like a tip on how to loop to insert an object into the mysql/ postgres database ... Example class User { // PRIMARY KEY public $id; public $login; // PRIMARY FOIREIGN KEY public $people;…
-
1
votes1
answer54
viewsHow to access the Sqls of the updates made by Doctrine Orm:schema?
I have an application running on a server (production) that does not give access to ../vendor/bin/doctrine and so I can’t run the commands, like the orm:schema-tool:update, for example. I am running…
-
1
votes1
answer266
viewsReturn records from a table whose key is referenced in another Cakephp 3
I’m using the ORM native of Cakephp 3 to retrieve the product table records (through the ID) along with the records that references it with the following method: public function view($id) {…
-
1
votes1
answer228
viewsSugar ORM ANDROID
Good morning Is there any way to change tables and fields in the Sugar ORM database, so that when performing the app update, it does not lock? I have a register and I own the PRODUCTS table and it…
-
1
votes1
answer1525
viewsMap columns of separate tables into a single object and vice versa
Situation 1 I have the following tables, very simple: ....................... And I have the following classes: Client: @Entity public class Cliente implements Serializable { private static final…
-
1
votes1
answer100
viewsDoctrine DQL with WHERE does not work
Good afternoon! I’m trying to perform a query in a table of users that has FK of 4 other tables, but I believe that is not the case, and perform 2 filters in WHERE, for example WHERE login =…
-
1
votes1
answer443
viewsFilter tables to be mapped by Doctrine from Entitymanager (no command line)
I’m developing a feature in my application that consists of automatically mapping and generating entities. The problem is that the user can select the tables he wants to map, so I must insert a…
-
1
votes0
answers124
views