Skip to content

.joins issue #5

@davidrenne

Description

@davidrenne

I am finding that somehow when joins is used joining another table against a pipeline function, an incorrect alias is used in the joins.

It is using the entire package.function name in the INNER JOIN instead of the alias you automatically generate in the pipelined_function_alias.

Example:

SELECT "MP".* FROM TABLE(MY_PACKAGE.MY_PROCEDURE(:parameter)) "MP" INNER JOIN "XXXXXXXX" ON "XXXXXXXX"."XXXXXXXX" = "MY_PACKAGE"."MY_PROCEDURE"."ID"

This instead should be "MP" instead of the full object name.

I am about to abandon this gem because queries are not working as planned when doing more complex things. Things such as the find method are not working properly, but if I find_by_id they work because the where function is called I believe.

I dont know if I have time to learn all of the code and how low level active record works to get these queries to work properly.

This might be back to the drawing board to get existing models and code to play nice with a pipeline function I think unless I can solve this joins issue and maybe the .find() issue and the decimal issue I have encountered.

I was really hoping this gem could be my savior and that all existing queries could be easily redirected with reads going to the new models and existing find, sorts, joins etc etc would just work because the record structure is the same results coming from the pipeline function that simply filters out data dynamically based on session/rules/parameters.

;.-(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions