1,333
questions
2
votes
1
answer
74
views
Why is my HashSet being serialized incorrectly in ORMLite? It appears to be serialized with the wrong size
I am saving a field in my app as a HashSet<String>, defined as such:
@DatabaseField(dataType = DataType.SERIALIZABLE)
private HashSet<String> allUsers;
Some devices are occasionally ...
0
votes
1
answer
70
views
ENABLE OrmLite Logging / Android / Java
I have taken over a project where the original developer used OrmLite as the DB library. I can not for the life of me figure out how to turn on SQL logging. I see a lot of posts asking how to turn it ...
0
votes
1
answer
62
views
ORMLite - persisting LocalDateTiime - Unparseable date
I'm using ORMLite to persist objects in an SQLite Database, but persisting LocalDateTime values does't work. I already configured a custom persister class like this:
public class ...
0
votes
1
answer
81
views
In ORMLite why should we use DAOs with an ID of a specific type when Object seems to work?
I can extend BaseDaoImpl using either Dao<InvoiceItem, Object> or Dao<InvoiceItem, UUID>, for instance. Why would I specify UUID when Object seems to work just as well?
Using Object in all ...
0
votes
2
answers
465
views
Trying to resolve ClassNotFound error when running program using OrmLite
I am trying to use OrmLite to connect to a SQLite database (not android). I have read the docs and I believe that my code is correct but I am getting a runtime error when trying to run. I am using ...
0
votes
1
answer
165
views
ORMLite Java, casing of sequences
I am trying to connect to postgresql with ORMlite from a Java client.
the DB gets generated perfectly, but when I try to insert something into a table that is using an autoincrement id I get the ...
0
votes
1
answer
174
views
ORMLite --- After .commit , .setAutoCommit --- Connection NOT closed
I use ORMLite on a solution made by server and clients.
On server side I use PostgreSQL, on client side I use SQLite. In code, I use the same ORMLite methods, without taking care of the DB that is ...
0
votes
1
answer
57
views
ORMLite and setting session date variables
What is the correct way of running a session formatting query via ORMLite? The reason that I am setting session formatting is that the queries that I run never retrieve any results and I keep getting ...
0
votes
2
answers
203
views
How to write several item in table at the same time using ORMLite
I use ORMLite on a solution made by server and clients.
On server side I use PostgreSql, on client side I use SQLite.
In code, I use the same ORMLite methods, without taking care of the DB that is ...
0
votes
1
answer
357
views
How to set timeout while creating connection in ormlite ConnectionSource?
The connection is created by the below method
import com.j256.ormlite.jdbc.JdbcConnectionSource;
import com.j256.ormlite.support.ConnectionSource;
ConnectionSource connectionSource =
new ...
0
votes
1
answer
172
views
Get PostgreSql table size on disk (byte) in ORMlite
I use ORMLite in a Java application, in order to deal with a PostgreSql DataBase.
I want to get the space on the disc used by a table of DataBase.
It seems that OrmLite doesn't have a specific method ...
0
votes
0
answers
112
views
ORMLite does not know how to store class Flight.scanner.modelFX.AirlineFx for field airline. Use another class or a custom persister
I'm in the process of learning JavaFx and creating my project "Flight scanner" and I have a small problem with the implementation of the ORMLite database.
My code is as follows:
Controller
...
1
vote
1
answer
565
views
How to increase default fetchsize for queries (Oracle DB)
How can I set the fetchsize for an Oracle database? For example, when starting SQL*Plus, I can set arraysize 250 and increase the performance of my queries drastically. How can I achieve the same with ...
1
vote
0
answers
51
views
many to many ormlite issue
The database I use is ormlite.
Which is a database for storing projects, developers, and another for many-to-many relationships between projects and developers.
But when I want to use for examples ...
0
votes
1
answer
222
views
How to persist JavaFX properties in SQLite using ORMLite?
I am using JavaFX to create an app and I need (it would be very cool) to persist JavaFX properties such as SimpleStringProperty or SimpleObjectProperty.
I've seen this issue (now closed) that make use ...
0
votes
1
answer
67
views
How to store byte[] in ORMLite Android?
This may be a duplicate question but none of the previous answer could work for me.
I am trying to store the byte[] in ormlite but I am getting following error.
java.sql.SQLException: ORMLite does not ...
0
votes
1
answer
266
views
Disable ORMLite logs when using log4j 2.13
I am using log4j:2.13 and ORMLite:5.1
I cannot figure out how to disable (or change level) of ORMLite logs without affecting the level of logs on the rest of my application.
ORMLite's documenation ...
2
votes
1
answer
114
views
How to persist enum const in ormlite as a interface type?
I have one enum, which implements an interface. The purpose of this interface is only to create a bound between multiples enums, so that I can later implements a plugin system. (This post may clear ...
0
votes
1
answer
318
views
Deadlock while using ORMLite
I have a multithreaded server Java application which receives requests and does queries/updates to a Postgres DB through OrmLite. Under load, several requests come in which are interested in the same ...
0
votes
1
answer
76
views
Selection from ormlite database table without duplicates
i am querying a table in my ormlite table which contains value1,value2,value2,value2,value3,value3,value4. i query the table and displays it in a recyclerview. I don't want the same value in the ...
0
votes
0
answers
467
views
Java 9 ORMLite conflict in module-info
I have a Java 9 (or higher) project in which I want to include ORMLite with a H2 database. Therefore I need the two maven dependencies
<dependency>
<groupId>com.j256....
3
votes
1
answer
2k
views
Any kotlin ORM for SQL? [closed]
Is there any useful and easy-to-use kotlin ORM for SQL? Like ORMLite. I'm making an app for android and i need to keep data classes there.
Honestly, I'm rewriting an android lasertag configurator ...
0
votes
1
answer
186
views
ORMLite QueryBuilder.orderByRaw(String, SelectArg) ignores SelectArg on QueryBuilder.queryRaw()
I have a fresh QueryBuilder<Card, Integer>, and I want to orderByRaw using a SelectArg.
//String column is coming from unknown source
SelectArg selectArg = new SelectArg(SqlType.STRING, column);...
0
votes
1
answer
155
views
Is it possible to assign multiple ORM configurations to a Java Model?
We have this situation:
One backend written with Spring.
One native Android app.
They share many of the models.
What it has been done is writing models in a package on the backend and then export it ...
0
votes
0
answers
50
views
Ormlite saving wrong day of date, depending on the hour of the day
I capture current data via javascript and send it to java so it can be saved to the database because I have an application in Cordova.
I've checked the date that is sent to the db by the function for ...
1
vote
2
answers
619
views
Should a single thread only acquire a single connection from a connection pool?
I am using ORMLite (Java) with HikariCP and I have a lot of code that's called asynchronously i.e. CompletableFuture.supplyAsync(Supplier). Inside a Supplier I have various calls to different ORMLite ...
0
votes
1
answer
135
views
How to import OrmLite in Android project using Bazel?
I am trying to import Ormlite in my Android project which is using Bazel build system.
This is what I did in WORKSPACE file,
maven_install(
artifacts = [
"com.j256.ormlite:ormlite-core:4....
1
vote
0
answers
183
views
How to implement multiple primary keys in ORMLite
In my database there are many tables with double primary keys and even triples. Would I have a great request how to map such a table in ormlite in Java? For example: I have an Order and Product table, ...
-1
votes
2
answers
196
views
ormlite dao delete function not taking parameters
Trying to delete all records from table on a already built app. I has ormlite dao and the function seems very simple
allUsers have a collection of objects to be deleted but i get an Exception :-
...
0
votes
1
answer
44
views
ForeignCollection throws SQLException on iterating using streams
I have three entity classes: PlayerData, IpData, and TwinData.
Both TwinData and IpData refer to PlayerData with a foreign key.
Here is the code:
@DatabaseTable
public class PlayerData {
@...
0
votes
0
answers
85
views
ORMLite Android Sub queries for filter item using multiple values
I have DB object like below and I am able to filter items which equal to given single value but I want to do it with multiple value like below :
@DatabaseTable(tableName = "item_list")
public class ...
0
votes
1
answer
239
views
Store enum collection in database using ORMLite
I'm trying to save enum collection in database with ORMLite. So while creating Dao I'm getting no-args constructor error
I have tried create default package contructor, but it doesn't helps - I think ...
2
votes
0
answers
374
views
How to use Viewmodel and LiveData with OrmLite DB and retrofit
Since the Loaders have been deprecated as of Android P (API 28) as stated here: Loaders, I decided to use ViewModel and LiveData in my app, but unfortunately there's a there are few tutorials and ...
0
votes
0
answers
44
views
Android Studio doesn't finish to build while using ORMLite
I'm working on an Android Studio project made by someone else which uses ORMLite.
When I try to build the project the process arrives in :app:createORMLiteConfigDebugFile and then never comes to an ...
0
votes
1
answer
148
views
OrmLite - How get count of deleted rows?
Android application using ORMlite with SQLite. Here my method that delete some rows from table:
private static boolean apply(Dao<NotificationInvoice, Integer> invoiceDao) {
boolean ...
0
votes
1
answer
66
views
Ormlite change order of query
I have create a query in orm lite like this :
TAbleA.queryBuilder()
.where()
.eq("col1", Wait)
.or()
....
1
vote
1
answer
860
views
ORMLite with Android DB Connection
I have a server and I am using ORMLite for the connection with the server, however I had seen the examples but in the task of creating the connection don't know how to do it without using JDBC.
// ...
1
vote
1
answer
557
views
Ormlite saves the Date format with Arabic digits in the database
I have an issue with saving the date using Ormlite when the default locale in the app is "ar" Arabic and the device language is Arabic. The date is saved in SQLite with Arabic digits, but I need the ...
2
votes
2
answers
1k
views
How to solve NoClassDefFoundError on Heroku using maven?
I am trying to deploy my app on heroku and i am getting a NoClassDefFoundError while calling the index.html page. The Error log looks like this:
2018-11-04T19:13:02.080531+00:00 heroku[web.1]: ...
0
votes
1
answer
1k
views
SQLException: Access denied when connecting to mysql in docker
I want to deploy a springboot application into a Docker container running mysql. The application has to connect to mysql in the startup process and I am using ormlite library in order to do so. Even ...
1
vote
1
answer
148
views
How do I autowire OrmLite DAO instances into Spring Controllers?
So I'm using SpringBootApplication to create a quick server application.
I want to have persistence in this application as well, so I added OrmLite to handle my SQLite database.
Instantiating ...
0
votes
1
answer
92
views
What is Android Room foreign key used for?
What exactly is Room @ForeignKey used for?
I know that it is used for linking two tables, so that whenever some update happens to the parent it updates children as well. For example,
onDelete = ...
0
votes
1
answer
435
views
How to Create Login query with android orm?
I need to create a login page with Android Studio and my question is how to
create login query with Suger ORM? Please answer me just with orm (netter answer me with Suger ORM but is not different in ...
0
votes
1
answer
33
views
Room Annotations on Top of OrmLite Annotations
I am transforming OrmLite Library to Room Library. Instead of creating new objects for Room and converting OrmLite objects to it, I am just creating Room objects on Top of OrmLite objects.
@Entity
@...
0
votes
1
answer
139
views
ORMLIte raw query on substring of field
I have a table in SQLite that has four columns (id,login_date, logout_date, userid). The date fields has stored like as : 2018-09-18 17:20:19.955000. I want to select rows in a period of date ...
0
votes
1
answer
211
views
How select a period of date from sqlite
I have a table in SQLite that has three fields (id, fromDate, toDate, uid). I want to select rows that has created in a specific dates. User select the period of time (from date/ to date). How I can ...
1
vote
0
answers
157
views
ASP.NET API Exception after using ServiceStack.OrmLite.SqlServer.Converters
I wanna use SqlGeography for its benefits in sql server 2016 and I have Visual Studio 2017 while using servicestack 4.5.14 and ormlite.
First and foremost I want to have SqlGeography as data type for ...
0
votes
2
answers
298
views
How to store images into ORMLite
I've an application that each member has a profile photo. The user can select an image from gallery. I'm going to store the users profile image into ORMLite database.
profileImage....
0
votes
1
answer
1k
views
JavaFx with Sqlite database deploy
I am working on a JavaFX application in which I am using SQLite database for storing some important information. Since I am working on IntelliJ, the created database file is in the root directory of ...
4
votes
0
answers
490
views
/tmp/sqlite-3.7.2-libsqlitejdbc.so: undefined symbol: pthread_mutexattr_init
I am working on a JavaFX application in which I am using Ormlite for SQLite database. When I run this application locally in IntelliJ, it works fine. It also works fine when application compiled jar ...