Have not seen a response, so I'll take a stab...

I think it would depend upon the type of abstraction you are looking for
here.  The abstractions of the db structures in Hibernate are housed in
the org.hibernate.mapping package.  Classes such as Table, Column, and
Index live there.  So if you want to build an abstraction starting at
that level, then this would be the place to start.  And the cool part
about going this route is that the Hibernate tools will be getting
refactored to use this meta-model in their processing, one of which
being the schema generation tool; so going at this level might give you
that ability for free later on.

If you are instead interested in abstracting at the level of
"statements", then it gets a little more hairy using the Hibernate
classes directly as they are today.  Essentially, you'd be dealing with
the classes in the org.hibernate.sql package.  But for this to be useful
outside of Hibernate, I think you'd have to add some capabilities around
this functionality.  When the classes in this package "get down to it",
it's really just string manipulation.

So can you speak a little more to the "level" of abstraction for which
you are looking?

Perhaps a good approach would be the first level of abstraction, with
another layer over the top which knows how to aggregate these lower
level abstractions into statements (i.e., SelectStatement,
UpdateStatement, etc) considering things like joins and subselects and
accounting for the various dialects during rendering.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alexey
Loubyansky
Sent: Wednesday, September 22, 2004 7:26 AM
To: [EMAIL PROTECTED]
Subject: [Hibernate] simple persistence solution needed

Hello colleagues,

there are areas in JBoss that need persistence solutions. Right now each
area has its own more or less ugly solution (not because of developers'
skills but more because of JDBC portability issues, differences in
database data types, etc). We could use Hibernate. But Hibernate is a
solution for business domain persistence and looks like too much for our
local problems.
So what is in fact needed is some very simple persistence API and the
ability to generate database schema (in fact one-two tables) which
guarantees portability across database products and can be re-used in
different areas in JBoss.
Up to this level, it's not really a big problem and I could implement it
as a separate library but after some discussions there was a decision to
try and add (or maybe just externalize/refactor) this functionality in
Hibernate.
First of all I would appreciate comments from the Hibernate team on
this. Is the problem more or less clear? How would you imagine this done
in Hibernate? What should I start with? What branch? Any other comments,
ideas?

Thanks!

alex


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to