Skip to content

How to handle same entity on different schemas #3010

Answered by Nahuel92
Nahuel92 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, I wanted to give an update on this discussion.

In the end, I opted for using JdbcOperations and pass it a query created dynamically by hand (after validating parameters to avoid a SQL-injection vulnerability). This is because schemas can't be passed as a parameter to PreparedStatement. It's not ideal but it saves me from more complexity and code duplication that, otherwise, I would have ended up with.

It would be awesome if I could use Micronaut Data JDBC to map the same entity to different schemas, but as far as I know it seems not to be possible (I couldn't, at least).

Replies: 2 comments 15 replies

Comment options

You must be logged in to vote
15 replies
@Nahuel92
Comment options

@dstepanov
Comment options

@Nahuel92
Comment options

@dstepanov
Comment options

@Nahuel92
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Nahuel92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants