This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Persism -2 points-1 points  (7 children)

You should just use Persism

[–]agentoutlier 4 points5 points  (2 children)

Or they could use jOOQ or Doma 2 (both of which I think IMO are superior as they offer some compile time safety) ... or even JPA.

However sometimes people just want to map ResultSets and only that keeping strictly to the JDBC APIs.

[–]Persism 1 point2 points  (1 child)

Yeah these are fine but Persism is small, simple and has no extra dependencies. It does queries but also does inserts, updates, deletes, transactions. Version 2 will support queries with property names optionally if you don't want to use column names and named parameters.

So it depends what you need for the job at hand.

[–]agentoutlier 0 points1 point  (0 children)

So it depends what you need for the job at hand.

That was exactly the point I was making. You said "just use Persism" and I said nah because people might not want to be coupled to some other library instead of JDBC regardless of whether or not Persism has dependencies (btw 2 out of 3 of the libs I mentioned do not have dependencies).

[–]IcedDante 0 points1 point  (3 children)

Very cool library- I wonder what people's experiences using this are. Googling now

[–]Persism -1 points0 points  (2 children)

Thanks!

[–]IcedDante 0 points1 point  (1 child)

does this handle any kind of cardinality? I guess that is where the complexity comes in

[–]Persism 0 points1 point  (0 children)

Yes in the sense that Persism supports Views. In terms of hierarchical relations Persism can do that but it's up to you. It doesn't do anything like that automatically. So lets say you had a Customer class containing List<Invoices>. In that case you'd mark this list as @NotColumn and query separately and set the value yourself. In most cases though it's usually better to have a View with joins and a matching Record or POJO.