Questions tagged as 'orm'

1
answer

Compare value of a preformatted field with sha1 in eloquent orm

I am sending a URL to the mail of a user who should receive it like this: link Where 23 is the id of a record in a table, which for practical purposes is not desired at this time, so I convert 23 with sha1 () a string .. so that the URL...
asked by 16.07.2018 / 06:07
1
answer

Left join QueryBuilder Symfony 2

I can not understand how to do a LEFT JOIN using QueryBuilder of symfony2, the query I need to ask is this: SELECT * FROM extranet.version_portal v LEFT JOIN extranet.version_portal_usuario vu ON vu.version_id = v.id;     
asked by 03.10.2018 / 11:02
1
answer

How to do this with ORM Laravel

In my database I have the following tables: Document (idDoc, title, type) Project (idProject, name) DocumentProject (idDP, fk_Documento, fk_Proyecto) I need to know how to do this with the Laravel ORM in a single consultation. 1.-...
asked by 12.07.2018 / 18:18
1
answer

Filter by weekend in a certain range of hours. Django

I am trying to make a query that I return the number of orders that your delivery date is during the weekend between 7 am - 11 am and I have been trying this way: Order.objects.filter(delivery__range=[breakfast_start_date, datetime.now()], sta...
asked by 13.03.2018 / 23:07
1
answer

Can you explain differences between eloquent and \ DB :: in Laravel?

I just started with Laravel and I have several problems ... the fact is that I was using the \ DB :: Like this for example that you already know: $macUsuario=\DB::table($this->tablaMac) ->join($this->tablaUsuario, $...
asked by 11.12.2017 / 20:34
1
answer

Is there a way to implement an ORM repository with a Rest service as datasource?

I wanted to make several applications / modules that communicate through webservices Rest, I like to use the dao pattern and I was looking for if jpa or hibernate or spring data (in general an ORM), they allowed to do this kind of thing, that is...
asked by 01.07.2017 / 02:09
2
answers

Make a correct query of two tables

I'm having a problem with a query in Laravel where two tables are related: Empleados and Emergencias in a 1: N relationship. According to me, I have good relationships in my models that are the following. Employee class...
asked by 10.03.2017 / 16:26
1
answer

Eloquent Count + Group By + Inner join

I am having some problems with the queries in the ORM-Eloquent, I have integrated eloquent in codeigniter, I am trying to make the following query: SELECT tp.*, COUNT(*) as cuenta FROM tipo_llamadas tp INNER JOIN encuestas e ON tp.id = e.id_ti...
asked by 15.12.2016 / 16:52
0
answers

Doctrine list indexes associated with entities

Is there a way to obtain the list of indices by command line, the list of indices associated with the relationships between doctrine tables? I have a hexadesimal index that I can not find, if I use the Oracle database it does not appear among th...
asked by 20.12.2018 / 14:11
0
answers

Microservice database and relationships between them

I'm working on an application on Python using the Flask framework. It is oriented to microservices and each one has its own database. I am currently in the process of creating the models of one of the microservices using Flask-SQLAlchemy. The...
asked by 02.01.2019 / 12:41