How can I limit the number of columns being fetched by ActiveJDBC? Is there something similar to Hibernate Projections in ActiveJDBC?
1
There are 1 answers
Related Questions in ORM
- SQL schema for a fill-in-the-blank exercise
- ERROR: column "country" is of type text[] but expression is of type record (SQLSTATE 42804)
- JPA Hibernate OneToOne Mapping
- query in objects with django orm with a containing sentence
- peewee: SQLite - peewee Create() is forcing integer in PrimaryKeyField if leading character is numeric (even if there is a non-numeric in the middle)
- PHP ORM DOCTRINE
- Error appending to array oOnConflictUpdaste using Drizzle ORM (Postgresql)
- Sequelize foreign key vs SQL how to implement it
- How do i work with a potentially nullable field in prisma ORM and MongoDB that references the id of another model?
- record doesn't exist error when creating a new record
- Several relationships in one model in Laravel
- SQLALCHEMY ORM - error when using variables both for column, value in WHERE
- How to exclude instances with empty querysets in prefetch_related?
- Optimize SqlAlchemy ORM DB models
- What are the best practices regarding SSR, Django and temprarly changed data?
Related Questions in ACTIVEJDBC
- ActiveJDBC instrumentation in ActiveJDBC 3.0 for Java 17 takes too long in big models
- Quarkus: Is there a way to exclude classes from automatic reload/recompile in the dev mode?
- Quarkus ActiveJDBC integration
- ActiveJDBC: Joined rows of findBySQL with join are empty
- Unable to Eager load children using getAll(..)
- ActiveJDBC has SQLSyntaxErrorException
- Mock RequestContext to run a test
- How to make ActiveJDBC support more Postgres data types
- How to improve activejdbc startup performance?
- Virtual attribute of ActiveJDBC model
- activejdbc migrator force to create `schema_version` table if it exits
- activejdbc with aws Lambda
- I keep getting an error message about Instrumentation for ActiveJDBC in IntelliJ
- JavaLite examples, Simple Example Running Error
- ActiveJdbc unable to include the table
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Technically speaking, ActiveJDBC is an ORM, and as such will fetch all attributes related to a model (all columns from table). If a model instance is does not have them all, than the 'O' is missing from the ORM :). In other words, it stops being an object that represents a relation.
If this is absolutely what you need to do, then you can do the following:
List<Person> retirees = Person.findBySql("select first_name, last_name from people where age > ? ", 65);This way, the query will populate only the
first_nameandlast_nameattributes. In general, you can pass any query to thefindBySql(), and the model will read values whose names match that model's attribute names.