ActiveJDBC is a Java ORM modeled on ActiveRecord from Ruby on Rails.
Questions tagged [activejdbc]
215 questions
0
votes
1 answer
Get Column Data Type Using Active JDBC
How can I get column data types using Active JDBC ? Is It Possible?
I need data type for each column of my model for automation purposes.
Thanks in advance .

Vincent Dingding
- 19
- 5
0
votes
1 answer
Getting records with offset and orderBy in activeJDBC
I get duplicate records using:
List postList = Post.findAll().limit(Long.valueOf(request.queryParams("limit"))).offset(Long.valueOf(request.queryParams("offset"))).orderBy("id desc");
When I remove orderBy it works fine.
First pull: limit is…

kittu
- 6,662
- 21
- 91
- 185
0
votes
1 answer
ActiveJDBC no models found , eclipse windows
I'm working with activejdbc in eclipse windows and I did what is mentioned here to configure eclipse to be able to run activejdbc, but I get this error every time I want to work with database, I think the problem is because of instrumentation,…

Mohammad cs
- 191
- 1
- 10
0
votes
1 answer
Find records with Many2Many using activeJDBC
I have these annotations for the models:
@Many2Many(other = Course.class, join = "registrations", sourceFKName = "student_uid", targetFKName = "course_uid")
public class Student extends Model {
}
@Many2Many(other = Student.class, join =…

ln9187
- 730
- 1
- 7
- 23
0
votes
1 answer
ActiveJdbc open/close Db architecture
I'm building a webapp using ActiveJdbc. Everything works perfectly.
I just a "problem" with my architecture.
Using Spring 4, I have a filter where I open the connection, do what I have to do and then close it.
try {
…

Rony
- 101
- 1
- 8
0
votes
2 answers
How to pass Model as an argument in a method ActiveJDBC
Can I pass Model as an argument in a method using ActiveJDBC?
Something like this:
public Set getColNames(Model modelName){
Set set = modelName.attributeNames();
for(String x: set){
System.out.prtinln(x);
}
…

Vincent Dingding
- 19
- 5
0
votes
1 answer
Record deletion Error "unknown column id in where clause" ActiveJDBC
When I delete a record it shows an weird error,
"unknown column 'id' in 'where clause'. DELETE FROM tableName WHERE id='' null"
Something like that. The error seems to be self explanatory, BUT in my table I dont have a column id.
Table…

Vincent Dingding
- 19
- 5
0
votes
1 answer
Validation on deleting record ActiveJDBC
What would be the best approach if I want to put validation upon record deletion?
Here is the reason why.
I have two tables, Store and Staff.
Structure of Store:
ID
Store Code
Store Name
Structure of Staff:
ID
Staff Code
Staff Name
Store Code
As…

Vincent Dingding
- 19
- 5
0
votes
1 answer
Is there a function or class in ActiveJDBC that will get MySQL table column names? (String)
How to get table column names in MySQL using activejdbc?

Vincent Dingding
- 19
- 5
0
votes
1 answer
Instrumentation Error even if already Instrumented. (Standalone Instrumentation, using CaptainCasa Framework)
Even if Eclipse already said that class is instrumented, when I click "Reload Server" on CaptainCasa toolset, error occurs
org.javalite.activejdbc.InitException: you are trying to work with models, but no models are found. Maybe you have no models…

Vincent Dingding
- 19
- 5
0
votes
0 answers
ClassCastException With Model Extending ActiveJDBC Model
I have a class A that extends the activejdbc.Model class in a common library used in multiple of my projects.
I want to add methods to that class in a project using that library without having to go modify the library (the methods will only be used…

Paul Szyller
- 33
- 3
0
votes
1 answer
How to return records from database using javalite?
I am using the following line to query the DB:
List postsCategories = PostsCategories.findBySQL("select category from posts_categories");
Instead of returning only [{category=Miscellaneous},....] it is returning extra info such as…

kittu
- 6,662
- 21
- 91
- 185
0
votes
1 answer
How do I refresh a materialized view with activejdbc?
I've tried using Base.exec / new DB("default").exec("refresh materialized view concurrently ... and neither work. No errors, but the statement isn't run.

dessalines
- 6,352
- 5
- 42
- 59
0
votes
1 answer
Implementing record level or field level security in ActiveJDBC
Igor,
I was wondering if you might have some hints as to how I might go about implementing record level, or possibly, field level security using ActiveJDBC. I played around with extending the Model class to override some of the methods from Model. …

Dave
- 2,546
- 6
- 23
- 29
0
votes
1 answer
com.google.cloud.sql.mysql.SocketFactory ClassNotFoundException
Hi I am new to web development and am trying to get activejdbc to connect to a cloud sql instance... I am getting the following stacktrace:
[ERROR] Failed to execute goal org.javalite:db-migrator-maven-plugin:1.4.11:migrate (dev_migrations) on…

Tomas Maldonado
- 23
- 7