Questions tagged [activejdbc]

ActiveJDBC is a Java ORM modeled on ActiveRecord from Ruby on Rails.

215 questions
1
vote
1 answer

How to understand this delegator

I'm reading the source of activejdbc, found these methods in ModelInstrumentation. public void instrument(CtClass modelClass) throws Exception { addDelegates(modelClass); CtMethod m = CtNewMethod.make("public static String getClassName() {…
Freewind
  • 193,756
  • 157
  • 432
  • 708
1
vote
1 answer

ActiveJDBC has SQLSyntaxErrorException

Using ActiveJDBC, I've been manually opening and closing connections, inserting and reading anything, all with no errors like this: public class DatabaseLoader { private static final Logger logger = LogManager.getLogger(DatabaseLoader.class); …
Larry
  • 13
  • 5
1
vote
2 answers

How to improve activejdbc startup performance?

My org uses legacy components with javalite + activejdbc for an ORM in our java web application. I am creating a local docker database (oracle 12c) for development. When I start the local jetty server pointing at my local database the startup takes…
George
  • 1,021
  • 15
  • 32
1
vote
1 answer

ActiveJDBC More than one Many2Many-association

I have a table with more than one Many2Many-Association to other tables. The names of the tables and columns are a little confusing, so i have to use the @Many2Many-Annotation. But i can´t use this annotation twice?! What is the recommended way to…
CSan
  • 954
  • 1
  • 10
  • 25
1
vote
1 answer

ConnectionSpecWrapper no longer present in recent releases

Why the activejdbc class ConnectionSpecWrapper has disappeared in recent releases? in the 3.0 (and also 2.3.2-j8) activejdbc jar we have:…
1
vote
1 answer

ActiveJDBC , How can i query some columns i interest with in a single table

when i query a single table , i do not want all columns , i just want some column that i interest in. For example, when i use where method to query a table, it will query all columns in a table like public class SubjectSpecimenType extends Model…
靳刘杰
  • 25
  • 4
1
vote
1 answer

ActiveWeb - rendering parent attribute value

Suppose Author belongs_to Boook. Is it possible to do the same as in Rails templates in a Freemarker template: "author": ${book.author.last_name} I tried without success. May be my syntax is wrong or I'm missing something ?
belgoros
  • 3,590
  • 7
  • 38
  • 76
1
vote
2 answers

play framework with ActiveJDBC

I intend to use play web framework with AciveJDBC for persistence. The issue with active JDBC is that it requires instrumentation. My question is , Will I need to do a restart on the server to see the changes made on classes that need…
joshua
  • 4,118
  • 3
  • 40
  • 53
1
vote
1 answer

Get column order of table in activejdbc

Is there a way to get the columns of a table in the order that they are defined within the database in activejdbc? I tried this: User u = new User(); // User extends org.javalite.activejdbc.Model Map columns =…
CBH
  • 23
  • 4
1
vote
1 answer

Automatic ActiveJDBC instrumentation in VSCode

I use VSCode as editor and I need to make automatic running instrumentation of my model classes. To run it manually I run in shell mvn org.javalite:activejdbc-instrumentation:2.0:instrument
Alexey
  • 601
  • 7
  • 17
1
vote
1 answer

ActiveJDBC, IntelliJ, and Gradle

I'm trying to setup a debug configuration in IntelliJ for a Gradle project that uses ActiveJDBC, and I'm running into an error. In the config, I put a call to run the instrumentModels task, but I still get an instrumentation exception. I switched…
Delmania
  • 812
  • 10
  • 20
1
vote
1 answer

How to handle re-connects to the DB with ActiveJDBC

I've a Spring Boot Java application in production that uses ActiveJDBC to access a MariaDB database. If at launch the application boots before the db server, of if the db server crashes and restarts, the apps doesn't re-estabilish the connection…
Marco Pantaleoni
  • 2,529
  • 15
  • 14
1
vote
1 answer

Getting the result of an auto_increment key after a save

I am trying to solve a problem of disconnected clients while using activejdbc. So the client app queues the inserts and subsequent updates and deletes when there is no internet. Then the batch of these come thru when they have connectivity. To…
oldDave
  • 395
  • 6
  • 25
1
vote
1 answer

ActiveJDBC instrumentation with Eclipse debug

I am using ActiveJDBC and I am able to get the instrumentation generated properly and included when I build and run my project with gradle from the command line. When I use Debug As/ Run As from Eclipse, the instrumentation seems to be skipped and I…
subbu
  • 61
  • 7
1
vote
1 answer

How to get parents by IDs when using polymorphic associations

I have a many-to-many relation table site_sections with the following columns: id site_id section_id which is used a join table between sections and sites tables. So one site has many sections and a section is available in many sites. Sites table…
belgoros
  • 3,590
  • 7
  • 38
  • 76
1
2
3
14 15