0

i have a Table where an ArrayList of prices is saved via Hibernate as a Blob. Now i will get access to that list via IN clause. Is this possible? All with a JOIN of two tables

i.e. with:

SELECT * FROM products as p, prices as pr WHERE pr.id IN p.prices

p.prices contains an ArrayList with the id of the prices

1 Answer 1

1

No that is not possible. If you do wish to do anything like this you should store a string of price_id's as a CLOB (TEXT) and use LIKE '%yourID%' OR LIKE '%anotherId%'. But watch out though, this is ugly and you need to make sure you cater for situations so that looking up id 5 is not matched by id 15.

It sounds like you are taking some shortcuts you should seriously reconsider.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.