orm Questions

4

I use Prisma as an ORM and had to change remove some columns and add others. I've already updated the database with the new columns and recreated the prisma schema but the problem is that now every...
Kozlowski asked 28/4, 2022 at 12:22

2

Solved

I want to perform a Drizzle Migration on Production on a VPS. I can't run 2 commands pnpm db:migrate:prod & pnpm start in a Dockerfile. Dockerfile # Where & how do I run `db:migrate:prod`? ...
Basia asked 21/2, 2024 at 14:34

3

Not sure if this has been asked before, but in the SQLAlchemy docs they talk about introducing select() as part of the new 2.0 style for the ORM. Previously (1.x style), the query() method were use...
Wachter asked 1/7, 2022 at 11:4

4

I am using SQLAlchemy with the ORM paragdim. I don't manage to find a way to do a CASE WHEN instruction. I don't find info about this on the web. Is it possible ?
Aden asked 29/6, 2012 at 8:52

3

Solved

I am wondering if it is possible using annotations to persist the attributes map in the following class using JPA2 public class Example { long id; // .... Map<String, String> attributes =...
Pestilence asked 3/8, 2010 at 4:49

7

Solved

So I have a Symfony 6.2 API, PHP 8.2 codebase. While trying to run composer install/update the following error is displaying and I'm wondering how to clear it: In CheckExceptionOnInvalidReferenceBe...
Pressey asked 2/1, 2023 at 16:40

2

Suppose I have a object model A, and it has a field called created, which is a datetime type field. If I use annotate to count how many A are created each day, I can use A.objects.annotate(date=...
Dulciedulcify asked 27/7, 2018 at 17:28

2

Solved

Though the pydantic's ORM mode is documented here, unfortunately there is no documentation for usage with aliases. How to use from_orm if the pydantic model defines aliases? It seems that the fro...
Ligni asked 6/2, 2020 at 14:55

2

Solved

All the docs I've seen imply that you might be able to do that, but there isn't anything official w/r/t ulong64/uint64 fields. There are a few off-the-shelf options that look quite promising in thi...
Masry asked 20/5, 2012 at 23:34

9

Solved

How should model class's equals and hashcode be implemented in Hibernate? What are the common pitfalls? Is the default implementation good enough for most cases? Is there any sense to use business ...
Adventure asked 28/10, 2009 at 17:15

8

Solved

with MongoDB (and I assume other NoSQL database APIs worth their salt) the ways of querying the database are much more simplistic than SQL. There is no tedious SQL queries to generate and such. For...
Breda asked 22/4, 2010 at 19:59

35

Solved

I receive following error when I save the object using Hibernate object references an unsaved transient instance - save the transient instance before flushing
Marney asked 20/2, 2010 at 16:17

3

Solved

How does this SQL statement translate into Propel (1.6.3)? SELECT * FROM table_a JOIN table_b With tableA and tableB sharing no Foreign Keys and having no relationships defined. TableAQuery::cr...
Critchfield asked 19/9, 2013 at 8:44

2

Solved

I have pretty much an identical issue as Dependency injection with custom Doctrine 2 hydrator, but I need to inject a service into a custom data type, not into a hydrator. The solution in the refe...
Bennir asked 6/7, 2016 at 18:9

6

Solved

I am new with nestjs. How can I set columns that accepts Date format and dateTime format? Not in both cases, the columns are two differents column, one accept Date and other dateTime.
Cid asked 2/7, 2020 at 12:44

1

I'm trying to create a table and a view based on this table in a SQLAlchemy/alembic/PostgreSQL environment, with alembic revision --autogenerate. I could properly setup things so that alembic ident...
Oswaldooswalt asked 31/10, 2023 at 20:54

9

Solved

I want to make use SQL Server sequence objects in Entity Framework to show number sequence before save it into database. In current scenario I'm doing something related by increment by one in sto...
Yettie asked 22/11, 2014 at 12:38

7

I have strange issue when I try to get entities property: Hibernate: select tarifklsk0_.ID as ID1_12_0_, tarifklsk0_.FK_TARIF as FK_TARIF2_12_0_, tarifservp1_.FK_TARIF as FK_TARIF2_11_1_, ta...
Quadrangular asked 13/6, 2016 at 1:47

4

Solved

For instance if I do something like: Criteria c = session.createCriteria(Book.class) .add(Expression.ge("release",reDate); .add(Expression.ge("price",price); .addOrder( Order.asc("date") ) .se...
Alter asked 12/3, 2010 at 15:55

3

Solved

I'd like to use peewee to create records from a csv. It looks like the syntax requires keyword args: user = User.create(username='admin', password='test') If the rows in the csv look like (admin...
Sacrilege asked 3/6, 2013 at 18:24

3

Solved

u = UserDetails.objects.create(first_name='jake',last_name='sullivan') u.save() UserDetails.objects.create() and u.save() both perform the same save() function. What is the difference? Is there an...
Joiner asked 29/5, 2014 at 5:37

2

Solved

I am just getting started using drizzle and created a simple table in a seperate schema file: import { pgTable, serial, text, varchar } from "drizzle-orm/pg-core"; export const users =...
Limacine asked 25/10, 2023 at 7:4

3

Solved

Prisma ORM has an implementation of the update or create upsert() method and a group of bulk requests, but there is no such thing as .upsertMany(), i.e. bulk "create or update existing records...
Wail asked 9/3, 2022 at 10:58

2

Solved

i want to get user's images at limit 2 from Follow model. Models const Follow = connector.define('Follow', { no: { type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true }, ...
Eo asked 7/11, 2018 at 8:45

7

Solved

What is the best way to interact with a database using Haskell? I'm accustomed to using some sort of ORM (Django's ORM, hibernate, etc.) and something similar would be nice when creating apps with ...
Emporium asked 19/9, 2008 at 19:50

© 2022 - 2025 — McMap. All rights reserved.