dao Questions

32

Solved

Error:Not sure how to convert a Cursor to this method's return type Error:Execution failed for task ':app:compileDebugJavaWithJavac'. Compilation failed; see the compiler error output for details. ...

8

Solved

Firstly it is possible that I am asking something that has been asked and answered before but I could not get a search result back. We define transactional annotations on service layer typical spri...
Cooperman asked 8/10, 2010 at 0:32

19

Solved

I am using Room architecture component for persistence. I have created generic DAO interface to avoid boilerplate code. Room Pro Tips But my code doesn't compile saying "Error:(21, 19) error: Typ...
Marquis asked 28/12, 2017 at 22:42

3

Solved

The official documentation states that: It is recommended to have multiple Dao classes in your codebase depending on the tables they touch. and that one can mark a method with the Transaction anno...
Lactary asked 9/1, 2018 at 8:24

7

Solved

I'm trying my hand at using Android Room and after following this tutorial I'm getting the following error when i try to build the app: Error:(23, 27) error: There is a problem with the query: [SQ...
Franek asked 9/8, 2017 at 15:8

5

Solved

Let's say I have one database with two tables: companies and employees. Should I create companyDAO and employeeDAO If I select, update, add and remove from those two tables? Or I should crea...
Marcelinomarcell asked 25/5, 2018 at 15:37

5

Solved

Directly from this oracle article about the J2EE DAO Pattern: Everything is very clear indeed but the Business Object "participant" (as they call it). Here I quote the bit I would like more insig...
Companion asked 9/6, 2013 at 10:6

2

I am trying to check if room database is empty or not before making a network call. but it is showing below error. error: Not sure how to convert a Cursor to this method's return type (java.lang...
Eleen asked 30/7, 2019 at 7:36

7

Solved

I have a class like: public abstract class BaseDao<T extends PersistentObject> { protected Class<T> getClazz() { return T.class; } // ... } But the compiler says to T.class;: ...
Henchman asked 9/9, 2013 at 21:49

3

Okey, so I tried to follow this guide: https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1 which led me to this code: https://gist.github.com/florina-muntenescu/1c78858f286d196d54...
Beheld asked 26/1, 2018 at 0:9

5

Solved

I've started to discovered Mockito library and there is a question for which I didn't find the proper answer. If I have for example such method in my UserDAO class that saves user in database: pu...
Impending asked 7/2, 2015 at 22:28

3

Solved

I am working on a Spring application (Spring 3.0) and following layered architecture i.e. Controller -> Service -> DAO layers. I want to write unit test cases for service and DAO layer usin...
Foghorn asked 22/12, 2011 at 9:5

2

Does the Python (Flask) SQL Alchemy uses both DAO and ORM design, or simply just ORM? I am learning design strategies and I thought of SQLAlchemy. Is it considered a DAO (clearly ORM) as well? By d...
Langlauf asked 22/10, 2021 at 13:12

16

I have below code in my DAO: String sql = "SELECT COUNT(*) FROM CustomerData " + "WHERE custId = :custId AND deptId = :deptId"; Query query = session.createQuery(sql); query.se...
Educt asked 26/5, 2014 at 9:15

3

I want to understand what is happening behind the scenes in a RoomDatabase, that it requires the DAO to be either an interface or an abstract class. I've been searching for quite a while, but all a...

4

Solved

That's the source code, I need to detect the ID (see the marked position between the two queries below). $connection = Yii::app()->db; $transaction=$connection->beginTransaction(); try { $...
Rollicking asked 3/6, 2014 at 11:42

3

Solved

My observer callback is not being called, can you point out what am I doing wrong ? My application is really simple since I'm just testing this architecture MainActivity code viewModel = ViewMode...
Torose asked 29/8, 2018 at 14:18

2

Solved

Upgrading kotlin to 1.6.0 causes Room Dao suspend modifier to break build project with error: "Not sure how to handle query method's return type........". Are there(here) any solutions ot...
Charente asked 24/11, 2021 at 10:46

2

Solved

I assume if you're using DTO and DAO, there is no need for entities, at least examples that i saw in this way. Or is it optional to have entities in this scenario ? public interface CustomerResourc...
Sector asked 5/11, 2021 at 8:59

3

Solved

I am facing some issues in Spring JPA. I successfully configured the Spring JPA project and am able to run the project without having any exception. I intension to save the entities to the databas...
Lindner asked 15/2, 2012 at 8:6

7

I have this Enum which I would like to use to set different statuses: @Enumerated(EnumType.STRING) @Column(name = "status", length = 20) private OnboardingTaskStatus status; public enum...
Phonometer asked 13/9, 2021 at 13:20

9

Solved

Hi i'm developing on web so i have an ajax function which calling to a controller function which calling to a DAO function (to make changes on DB). I'm getting the exception above in the controller...
Dowling asked 1/6, 2014 at 7:24

2

Solved

I've been working with Sequelize.js recently and come across the term "DAO" pretty frequently. Coming from ActiveRecord (in Rails), the idea of an ORM seems pretty straight forward. Could someone ...
Sudarium asked 5/1, 2017 at 21:36

12

Solved

I know that it is some kind of interface for accessing data from different types of sources. When doing research, I bumped into a concept called data source or data source object, which confused me...
Apgar asked 3/10, 2013 at 8:20

2

I'm new to java based web applications. I have to create a dynamic web project using MVC structure. So far I created three packages and some java classes like below. I have some doubts about these ...
Permission asked 22/8, 2020 at 7:29

© 2022 - 2025 — McMap. All rights reserved.