ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yuri de Wit <yde...@gmail.com>
Subject JPA Annotations + iBatis
Date Thu, 04 Jun 2009 21:35:40 GMT
Would it be possible to have iBatis reuse JPA persistence annotations to
infer resultmaps/submaps/discriminators and still allow me to customize the
SQL behind the scenes?

I am creating a bi-temporal data model and I am finding JPA a bit limiting
since it assumes a certain model for inserts, updates, and deletes. In my
case, for instance an update translates into an update + insert with added
assertions as where criteria and JPA doesnt offer me that kind of
flexibility. On the one hand, I am sold on class annotations to describe
mappings from classes/fields to tables/columns and the standard api to
persist, delete, etc, but on the other hand I would like to have total
freedom to craft my own SQL behind the scenes.

IBatis seems the perfect solution for me: total flexibility in the
mappings/statements with support for polymorphic queries etc. Thats when it
occurred to me what a great combination it would be if iBatis could reuse
the JPA persistence annotations to infer resultmaps and allow me to provide
the SQL to CRUD the POJOs. iBatis could even provide standard SQL queries
that would mimic the semantic of JPA although in my case I would rewrite
those.

Does something like this even make sense? Maybe there is even an open source
JPA implementation with a good separation of concerns so that the
annotations and API implementation could be reused to plugin the iBatis back
end.  Maybe this could even increase the adoption of iBatis?

best regards,

-- yuri

Mime
View raw message