Questions tagged as 'orm'

0
answers

When not to use Realm?

In some Benchmark tests, comparing Realm with SQLite and a few other ORMs according to link we can see a much superior performance compared to the other database. So here's my question: When not to use Realm? Why is your performance cons...
asked by 05.10.2017 / 16:12
1
answer

Symfony Single id is not allowed on composite primary key in entity

I have a view, where I mapped 3 fields as the primary key and 2 of those fields are foreign keys As below: /** * @var NotaFiscal * @ORM\Id * @ORM\ManyToOne(targetEntity="NotaFiscal", inversedBy="itens") * @ORM\JoinColumn...
asked by 24.10.2017 / 14:20
1
answer

How to reconcile good Object Oriented practices and ORM frameworks for getters and setters?

In many of the systems I have worked with or have had contact with, the class that represents a model is usually a POJO, which mapped its attributes for columns (for relational databases) or attributes (for some NoSQL databases). Thus, in many o...
asked by 31.03.2017 / 13:54
1
answer

Code First Migration Relationship and Insert?

I'm using UserManager to manage users, I'm using migration and I'm having relationship problem. It turns out that I have the Cliente entity: public class Cliente : IdentityUser { [NotMapped] public string Senha...
asked by 27.01.2017 / 11:53
1
answer

Different objects of type Model mapped from a single table

Is it possible to map different Model objects with ActiveRecord in a Ruby on Rails project from a single database table? Assuming I have in the database a table named clients that will be populated by clients of the physical type and le...
asked by 16.07.2016 / 03:31
0
answers

How to initialize hibernate with reflection

Hello, I need to initialize a list using Hibernate.initialize (list) within a Generic DAO. User Template @Entity public class Usuario { @Expose @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE}) private Lis...
asked by 04.08.2016 / 14:50
0
answers

ActiveRecord PHP relationship

I have two tables, requests and middle_payments in the pedidos table I have the foreign key meio_pagamento_id , as I define their relationship through of activerecord php? I tried : ClassPay Payment class MeioP...
asked by 19.08.2015 / 22:11
1
answer

How to access the SQLs of the updates made by the Doctrine schema?

I have an application running on a server (production) that does not give access to ../vendor/bin/doctrine and therefore I can not run the commands, like orm:schema-tool:update , for example. I'm running the commands in my developme...
asked by 21.04.2015 / 03:20
1
answer

How to fetch data from another entity using Doctrine 2

I have two entities a Product (id, category_id, name) and another Category (id, name), in the product entity want to bring the name of the category by the category_id of the product table. Is there a way to do this with annotations?     
asked by 16.12.2014 / 19:52
1
answer

Migrations HasMaxLength x HasColumnType

I'm creating a simple test table with EF Core e SQlite The first test in which modelbuilder creates a migration (shown just below) protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.En...
asked by 17.09.2016 / 04:52