ActiveJDBC is a Java ORM modeled on ActiveRecord from Ruby on Rails.
Questions tagged [activejdbc]
215 questions
1
vote
1 answer
JOIN clause wne using raw SQL in javalite JDBC
Is it possible to use a JOIN clause when using a raw SQL ? If so, how should I map the result as there are at least 2 models involved ?

belgoros
- 3,590
- 7
- 38
- 76
1
vote
2 answers
Issue including post compile phase modifications in artifact deployed to Tomcat
I am developing a Spring MVC application using ActiveJDBC as my ORM, a Tomcat Server, and IntelliJ as my IDE.
For necessary functionality, ActiveJDBC requires some byte code manipulation -- called instrumentation by the ORM -- of compiled classes.…

anishasri
- 71
- 1
- 5
1
vote
1 answer
Insert jsonb into postgresql
I want to create an object and save it ionto the DB
Log l = new Log();
l.setTimestamp("creation_date", Util.getCurrentTimestamp());
l.setString("app_name", "name");
l.setString("log_type", "type");
l.setLong("user_id",…

Rony
- 101
- 1
- 8
1
vote
1 answer
ActiveJDBC - Mapping Legacy Columns
Is there a way to map a legacy column to a different name with ActiveJDBC? My use case involves a legacy database - I have date_created and last_updated which I'd like to be used as the created_at and updated_at columns so they get auto populated,…

Todd Sharp
- 3,207
- 2
- 19
- 27
1
vote
1 answer
ActiveJDBC select record from multiple tables with an aggregate
Here is the situation. I have one table with multiple many-to-many relationships.
game (id, name, year_release ...)
game_price (game_id, price_id, amount)
price(id, label -- new game, used game)
category(id, name)
game_category(game_id,…

Rony
- 101
- 1
- 8
1
vote
1 answer
Many-to-Many extra field in activejdbc
I have 3 tables:
person (person_id, person_name),
game (game_id, game_name)
and the linked table
play(person_id, game_id, score).
With ActiveJdbc I use many2many annotation and it works fine to get all games for 1 person
List games =…

Rony
- 101
- 1
- 8
1
vote
1 answer
What steps are required to add support for Phoenix to ActiveJDBC?
I am trying to add some support for Apache Phoenix to ActiveJDBC. I am using the ActiveJDBC simple-example project as test, and making changes to a clone of ActiveJDBC 2.0-SNAPSHOT (latest from github).
So far in ActiveJDBC 2.0-SNAPSHOT I…

w39hh
- 11
- 2
1
vote
1 answer
ActiveJDBC and Java Generics causing
I have the following two classes, where the Document extends an Abstract class that provides helper functions, one of which is a "find" method that builds queries to find records based on some simple logic.
public abstract class AbstractTable

Dave
- 2,546
- 6
- 23
- 29
1
vote
1 answer
Unable to build test ActiveJDBC project in IntelliJ
Bottom line up-front: Here's the error I'm getting within IntelliJ:
Failed to execute goal org.javalite:activejdbc-instrumentation:1.4.2:instrument (default-cli) on project hsdart: Failed to add output directory to classpath:…

bstempi
- 2,023
- 1
- 15
- 27
1
vote
1 answer
How can I get data from a Table that does not have a Model?
Introduction
I am working on a project and I confronted a weird use case that maybe ActiveJDBC is not meant for, I pledge for patience because many things in this project are not in my control:
I have 10 to 15 small/medium databases (~30 tables…

LouizFC
- 161
- 1
- 10
1
vote
1 answer
Can't retrieve db Model getId() anymore in activejdbc 1.4.12
I was using activejdbc 1.4.9 and the following sample code was running just fine
Client client = new Client();
client.save();
Assert.assertNotNull(client.getId());
Since I upgraded to 1.4.12, client.getId() is always returning null when save is…

ccarvalho
- 11
- 1
1
vote
1 answer
Can't get activejdbc working?
I have the following classes:
package models;
public class Test extends activejdbc.Model
{
}
: and :
import activejdbc.*;
import models.Test;
public class ActiveJdbc
{
public static void main(String args []) throws Exception
{
…

yazz.com
- 57,320
- 66
- 234
- 385
1
vote
1 answer
Active Jdbc Association does not work
I have two classes called User and Competencia. I want make a relationship between them, but it doesn't work. See:
public class User extends Model{
}
@Table(value = "competencias")
@BelongsTo(foreignKeyName = "user_id", parent = User.class)
public…

Luciano Bezerra
- 35
- 4
1
vote
1 answer
How to parse JSON into an ActiveJDBC Model?
I am using ActiveJDBC for a pet project.
I cannot seem to find a way to convert a JSON array into List nor Java array.
The code below does take the JSON array and creates a list, BUT the model is not populated. Meaning, number.get("winning_numbers")…

Jose Leon
- 1,615
- 3
- 22
- 30
1
vote
1 answer
ActiveJDBC and quoted identifiers
I'm trying to use ActiveJDBC with a legacy DB where tables and columns often contain hyphens in names. This works OK for SELECTs as I can quote the identifier (e.g. Model.where("\"stupid-name\" = ?", 1)). The problem arises with INSERT/UPDATE as…

gimoh
- 53
- 4