ActiveJDBC is a Java ORM modeled on ActiveRecord from Ruby on Rails.
Questions tagged [activejdbc]
215 questions
0
votes
2 answers
defineClass for ActiveJdbc Model throw exception
When I try to connect my model class using defineClass (findClass URLClassLoader or self-realization ClassLoader), occurs exception.
Any other methods are being loaded my model, but do not allow dynamic overloading the…

Сергей Ходусов
- 11
- 2
0
votes
1 answer
ActiveJDBC with multi-tenant DB structure
I have a multi-tenant DB architecture. Is there any way to use one active model for multiple identical databases?
A little clarification:
I have a Foo exdends Model class that works with a foo_table. That foo_table is identical in schemaA, schemaB,…

Norbert Bicsi
- 1,562
- 2
- 19
- 33
0
votes
1 answer
ClassCastException when saving record in HSQLDB
I'm trying to migrate test DB from Oracle to HSQLDB. In Oracle I have fields with type NUMERIC (x,0). As I know NUMERIC type associated with BigDecimal java type. And when I run my tests and try to save record in DB I have the following error:…

ap_student
- 45
- 6
0
votes
1 answer
How do I unit test/Mock with fake data with activejdbc?
I'd like to mock some DB inserts and reads, IE, not do them to my actual production DB, but either create a mock, or do a temporary in memory type of thing, to be able to unit test some methods getting back fake data.
How do I do this in…

dessalines
- 6,352
- 5
- 42
- 59
0
votes
2 answers
Cannot insert object to HSQLDB with ActiveJDBC
I'm trying to use ActiveJDBC with HSQLDB:
Users.sql
CREATE TABLE users (
"ID" INTEGER GENERATED BY DEFAULT AS SEQUENCE seq NOT NULL PRIMARY KEY,
FIRST_NAME VARCHAR(100) NOT NULL,
LAST_NAME VARCHAR(100) NOT…

ap_student
- 45
- 6
0
votes
1 answer
IntrumentModels' task: Model class is frozen
I started a little project using Spark Framework and I chose ActiveJDBC as its ORM, It's using Gradle to build all whole thing.
(UPDATED, IT WAS USING ActiveJDBC 1.4.12)
Here is my build.gradle file:
buildscript {
repositories {
…

Aleff
- 257
- 1
- 3
- 13
0
votes
0 answers
Issue when updating DB Model column with empty value
I recently upgraded to activejdbc 1.4.12 and I'm noticing a different behavior when updating a record with empty values.
Please check example below:
public void createClient()
{
// create new client
Client client = new Client();
…

ccarvalho
- 11
- 1
0
votes
1 answer
Model instrumentation for inherited classes - ActiveWeb
I have inherited model classes:
public class AbstractUser extends Model
and
public class User extends AbstractUser
I'm attempting to extend from a base project into several children project. The Users in each project will have many similar base…

javastunt
- 20
- 6
0
votes
1 answer
ActiveJDBC eager loading of Polymorphic Parents
I am unable to eagerly load the polymorphic parent of a child class. The include statement seems to make no difference.
Child Class:
@BelongsToPolymorphic(
parents = {ParentRequest.class},
typeLabels = {"parent_request"})
public class…

Noah Ternullo
- 677
- 6
- 16
0
votes
1 answer
Activeweb/ActiveJDBC with C3P0 database connections
I'm attempting to get an ActiveWeb/ActiveJDBC connection configured to use C3P0 for connection pooling.
I know the documentation provided by Javalite says each transaction will be a single opened/closed connection, but does also mentions we can…

javastunt
- 20
- 6
0
votes
1 answer
how to customize xml headers
I have a resultSet formed by:
LazyList deliveryLabels = DeliveryLabel.findBySQL(sql);
String wxml = deliveryLabels.toXml(true, true);
The xml generated start with:
…

Luciano Bezerra
- 35
- 4
0
votes
1 answer
ERROR: relation "projectfile" does not exist in Activejdbc even if table exists
I am getting the following error:
org.javalite.activejdbc.DBException: org.postgresql.util.PSQLException: ERROR: relation "projectfile" does not exist
Position: 25, query: SELECT customer.id FROM projectfile LEFT JOIN project ON…

Cosmin D
- 639
- 1
- 11
- 24
0
votes
2 answers
Tomcat + ActiveJDBC: open/close connection using servlet filter?
My web application uses ActiveJDBC. This ORM framework requires to open new DB connection with every new thread (and of course close it when the thread finishes). I am wondering if the best way to achieve this is to use a Web Filter.
if this is…

Sharon Ben Asher
- 13,849
- 5
- 33
- 47
0
votes
1 answer
ActiveJDBC: integer[] on PostgreSQL with multiple schemas in one DB
I am trying to use ActiveJDBC to properly convert an integer[] from my PostgreSQL database into the java equivalent int[]. I get the fetch done properly, but the object that is returned is weblogic.jdbc.wrapper.Array_org_postgresql_jdbc_PgArray. I…

E Lopez
- 3
- 2
0
votes
1 answer
activejdbc: conditional join
I have two models: Book and Author
Book table has author_id and cover_color.
Author table has id(primary key) and name
I want to have all the books that are red and their author's name is "John".
Is it possible using activejdbc (without raw query)…

Feri
- 1,071
- 7
- 19