Questions tagged [dao]

A Data Access Object (DAO), is a design pattern in object-oriented software design, creating an object that provides an abstract interface to some type of database or other persistence mechanism.

A data access object (DAO) is an object that provides an abstract interface to some type of database or persistence mechanism, providing some specific operations without exposing details of the database. It provides a mapping from application calls to the persistence layer.

Source: Wikipedia (retrieved version)

More details: - Core J2EE Patterns - Data Access Object

2621 questions
0
votes
1 answer

Room One to Many relationship Kotlin

I have created Two Tables One Relationship.. I am not getting output as structured Product Table : @Entity(tableName = "Product") data class Products ( @PrimaryKey(autoGenerate = false) @ColumnInfo(name = "id") var id : Int =…
SasidharanIOS
  • 252
  • 1
  • 3
  • 12
0
votes
0 answers

Memory leak, connection pool full; Question: with dao's in cdi (weld): when are connections closed?

My question is: if you work with dao's in cdi (weld), in weblogic e.g., when are connections opened and closed? We use session beans, container managed transactions. We see: weblogic.jdbc.extensions.PoolLimitSQLException:…
ericj
  • 2,138
  • 27
  • 44
0
votes
1 answer

Can DAO access schemas in current Sql Server versions?

We have an app we maintain which is written in VB6 and uses the prehistoric DAO technology to do its database access. The database is in Sql Server 2008. We are writing a new module now, that I wanted to logically separate off with its own schema.…
eidylon
  • 7,068
  • 20
  • 75
  • 118
0
votes
1 answer

Data consistency in DAOs

Looking up "dao data consistency" or "data access layer data consistency" on Google returns nothing useful Suppose I have to write DAOs that use a SQL db as datasource and let's say that my schema enforces most (but not all) of the business data (?)…
0
votes
1 answer

Why does this line of code work half the time, and the other half gives me Data Type Conversion Error 3421

Here is the full code: Dim db As DAO.Database Dim rs As DAO.Recordset Dim frm As Access.Form Dim i As Long 'For readability Set frm = Forms!Frm_JobTicket 'Open Tbl_Schedule for adding Schedule Dates Set db = CurrentDb Set rs =…
Zrhoden
  • 57
  • 7
0
votes
0 answers

DAO Testing, its not taking the testing or Id not sure what its wrong?

public void createTimesheet_returns_timesheet_with_id_and_expected_values() { Timesheet createdTimesheet = sut.createTimesheet(testTimesheet); Assert.assertNotNull("createTimesheet returned null", createdTimesheet); Integer…
0
votes
1 answer

Wait for insert function to complete (Coroutine)

I have the following function in my ViewModel: fun insertMovie(movie: Movie): Long { var movieId = 0L viewModelScope.launch { movieId = repository.insertMovie(movie) Log.i(LOG_TAG, "add movie with id $movieId within launch") …
DeKekem
  • 589
  • 10
  • 20
0
votes
1 answer

Access Front-end to MySql: Forms won't add or update records

I have a problem using an Access Application connected to a MySql Database. I test UPDATE on one small table with a VBA procedure, using DAO UPDATE tblFormateur SET Prenom = 'Werner' WHERE Nom='HEISENBERG' " The first time I run the query, it's…
0
votes
0 answers

Is it an architecture issues to Use DAO within another DAO and Entity-reference within another Entity?

I am working on java web application with MVC-architecture (JSP+SERVLETS+MYSQL && NO ORM-FRAMEWORKS) and I have next database: database. I wanted to create table by JSTL core lib on my JSP-view that looks like…
Vadym
  • 1
0
votes
1 answer

Android Room - Query Not Calling Expected Constructor

I am rewriting my old Sqlite Android app that was in Java to be a Jetpack Compose app in Kotlin that uses a Room database. I've got about half of the app done but now I am seeing a strange behavior where my DAO query is not returning the data it…
clamum
  • 1,237
  • 10
  • 18
0
votes
0 answers

MS Access SQL to Update a RecordSet in Table/Query

I need help regarding the WHERE clause of an SQL statement to UPDATE field values [olnAg] in a query (qryCLFull same as tblCLFull). The field [olnAg] should be updated to the second text of [cellLine] field. So for example if [cellLine] has " This…
MordC
  • 61
  • 3
  • 11
0
votes
1 answer

Left join with <> condition (not equal to) returns wrong rows

HQL Statement: String hql = "SELECT DISTINCT track FROM TrackEntity track " + "LEFT JOIN track.releaseRelations releaseRelation " + "LEFT JOIN releaseRelation.release.publisherProducerArtists releaseArtist " + …
CrisV
  • 59
  • 1
  • 3
0
votes
1 answer

Unable to insert entity using room

I am new to android Room and trying to insert some one-to-many relationships into my database. But I am facing some issues that I have not managed to fix sofar. Here is my data constellation: Entity: @Entity(tableName = "artist") data class Artist( …
DeKekem
  • 589
  • 10
  • 20
0
votes
1 answer

How do you late-bind DatabaseTypeEnum values?

The DatabaseTypeEnum values are listed here. How do you late bind the values? At the moment I am passing literal integers: 64 for dbVersion40 128 for dbVersion120 This is the current code in context: public bool CompactAccessDatabase(string…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
0
votes
1 answer

Spring boot jooq dao trouble

I'm new to Java and Spring and I am doing my first rest service. I've encountered a problem to which I cannot find an answer. I generated entities using Jooq with pojos and daos org.jooq
True Seeker
  • 125
  • 1
  • 7