orm Questions
3
Solved
The database I'm working on has more than 100 tables, so I'm not going to sit here baking a model and controller for each one individually. I would like to bake all of the tables at the same time w...
Pounds asked 19/9, 2013 at 15:44
5
I have a Next.js project where I'm using Prisma to read from Postgresql.
I have code like:
const rows = await prisma.receipts.findMany({
where: {
action_receipts: {
// https://www.prisma.io/docs...
Dordrecht asked 7/2, 2022 at 22:31
3
2
Solved
How to set collation for a specific Column in a Sequelize model?
I tried this:
name: {
type: Sequelize.STRING,
allowNull: false,
collate: 'utf8_general_ci'
},
Apparently it doesn't work. Any...
Achlamydeous asked 10/8, 2018 at 15:34
5
Solved
package com.abc.def.model;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Entity;
import javax.persistence.Embeddable;
import javax.persistence.IdClass;
imp...
3
I've been trying to figure out this for a while but a lot of answers I can find now are out-dated (posts from > 6 years ago), or less related.
The question is really how to deal with database se...
Retiring asked 22/9, 2020 at 18:53
6
Solved
I'm learning Prisma ORM from video tutorials and official docs. They are explain and write All model code in one file called schema.prisma. It's ok but, when application grow it became messy. So, h...
Sanctified asked 17/2, 2022 at 18:34
16
I am trying to edit a table in Postgresql using JPA in Glassfish using EclipseLink. When I insert an entity, it runs fine. But, when I try to edit or remove the same entity, it fails with the follo...
Voracious asked 17/9, 2010 at 23:53
5
Solved
looking at the docs you can use
model.findAll({where: {attribute: x}}). However, I want to select all attributes that are simply NOT x. I was looking into a regular expression here but that seeme...
Homologous asked 10/9, 2017 at 4:10
11
Solved
I created a project with following structure:
HibernateUtil:
public class HibernateUtil {
private static final SessionFactory sessionFactory = buildSessionFactory();
private static SessionF...
3
Solved
I have a class A{Set b .....} which holds references of class B as Set. It is one to many relationship.
Both class have sequencer in oracle. I put cascade to all in hibernate annotations. When i sa...
Plaza asked 16/9, 2010 at 7:53
3
Solved
Say I have a model instance like this:
instance = session.query(MyModel).filter_by(id=1).first()
How can I delete that row? Is there a special method to call?
Mcintire asked 23/7, 2010 at 21:3
5
I have the following model:
class Process(models.Model):
title = models.Charfield(max_length=255)
date_up = models.DateTimeField(auto_now_add=True)
days_activation = models.PositiveSmallInteger...
8
Solved
I am using 2nd level cache and query cache.
May I know how to programmatically clear all caches ?
2
I'm writing a java code using ormlite. I was wondering if it's possible to generate an ERD from the JPA annotations in my code. Basically, I need the reverse of this: How can I transform Entity-Bas...
11
Solved
Even though I set the attribute to be @Column(unique=true), I still insert a duplicate entry.
@Entity
public class Customer {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long ...
Dorton asked 16/8, 2010 at 18:18
4
Solved
I am trying to create or update user with Hibernate 5 and it throws following exception:
org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl@779de014 is closed
I'm using the followi...
Quadrangle asked 1/3, 2017 at 18:1
4
Technology stack: Oracle database 11.2.0.2, Java 1.6, Hibernate 3.6.6.Final.
I am new to hibernate, apologize if this is trivial.
The following code was supposed to put some optimization:
Transa...
Laurentium asked 2/2, 2017 at 12:25
13
Is there any way to get SQLAlchemy to do a bulk insert rather than inserting each individual object. i.e.,
doing:
INSERT INTO `foo` (`bar`) VALUES (1), (2), (3)
rather than:
INSERT INTO `foo` ...
Nova asked 7/9, 2010 at 13:42
3
Let's say I'm using Django to manage a database about athletes:
class Player(models.Model):
name = models.CharField()
weight = models.DecimalField()
team = models.ForeignKey('Team')
class Team...
Fumed asked 25/10, 2013 at 20:38
5
Solved
I'm trying to optimize my ORM queries in django. I use connection.queries to view the queries that django generate for me.
Assuming I have these models:
class Book(models.Model):
name = models.C...
Apoplectic asked 20/10, 2015 at 7:29
28
I've got a datatable with 5 columns, where a row is being filled with data then saved to the database via a transaction.
While saving, an error is returned:
The conversion of a datetime2 data t...
Mccollum asked 26/8, 2009 at 0:39
12
Solved
im starting with JPA2 and feel quite comfortbale so far. But I have a problem when persisting Entities with null property values for NON NULL database fields with default value.
I would like to be...
Tuba asked 22/12, 2010 at 11:19
35
Solved
Is it possible in Hibernate to print generated SQL queries with real values instead of question marks?
How would you suggest to print queries with real values if it is not possible with Hibernate ...
4
Solved
How do you guys treat empty strings with Oracle?
Statement #1: Oracle treats empty string (e.g. '') as NULL in "varchar2" fields.
Statement #2: We have a model that defines abstract 'table structu...
1 Next >
© 2022 - 2025 — McMap. All rights reserved.