Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getArray() model method is missing in activeJdbc models #1214

Closed
biatenia opened this issue Jun 20, 2022 · 1 comment
Closed

getArray() model method is missing in activeJdbc models #1214

biatenia opened this issue Jun 20, 2022 · 1 comment
Assignees

Comments

@biatenia
Copy link

some SQL databases like Oracle or PostgreSQL support arrays as a field type, JDBC also supports that, using java.sql.Array,
https://docs.oracle.com/javase/tutorial/jdbc/basics/array.html

So, it would be great if ActiveJdbc can provide support to work with arrays in Models, instead of tricking manipulation with
Object get("field_name")

@biatenia
Copy link
Author

table example:

CREATE TABLE IF NOT EXISTS public.distribution_searches
(
distributor_ids integer[],
product_line_id bigint NOT NULL,
CONSTRAINT distribution_searches_pkey PRIMARY KEY (product_line_id),
CONSTRAINT fk_rails_f7115231de FOREIGN KEY (product_line_id)
REFERENCES public.product_lines (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
)

WITH (
autovacuum_enabled = TRUE
)
TABLESPACE pg_default;

@ipolevoy ipolevoy self-assigned this Jun 20, 2022
ipolevoy added a commit that referenced this issue Jun 21, 2022
#1214 - getArray() model method is missing in activeJdbc models
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants