|
Re: EMF Resource extension for direct RDB/SQL [message #529094 is a reply to message #529066] |
Thu, 22 April 2010 22:27 |
Bryan Hunt Messages: 366 Registered: July 2009 |
Senior Member |
|
|
This can certainly be done. There are a couple of options you can
take: you can map objects to tables where attributes and references map
to columns, or you can serialize the entire resource as a blob / clob.
Storing resources as a clob / blob is not too dificult. The easiest
approach is to craete a custom URIConverter to access the input and
output streams from the database lob. Mapping an EObject and its
EAttributes to a table is also not all that hard. When you start
supporting EReferences, that's when it gets hard. There are several
subtle problems that must be solved to have a generic solution. If you
go this route, expect to spend several months developing a solution.
Bryan
On 2010-04-22 14:42:38 -0500, Alexey <alexeyy3@gmail.com> said:
> The EMF Bible (EMF Eclipse Modeling Framework by Dave Stainberg, Frank
> Budinsky) mentions couple of times that EMF persistence can be
> implemented with RDB/SQL. Naturally, Teneo is providing that with ORM
> (Hibernate). But... some requirements from real life are more retarded
> that others. So I am looking for any precedent to extend Resourse
> persistence support with direct SQL. E.g., when URI.createURI(...)
> would accept DB URL (like jdbc:mysql://host_name:port/dbname) and
> eventually would use java.sql.Connection, while EMF would help to
> generate a content to put in java.sql.Statement (of some type).
>
> So, are there any reasons not to do that? Problems? Did anybody try? Is
> this a stupid question? Why then?
>
> Thanks
>
> Alexey
|
|
|
Powered by
FUDForum. Page generated in 0.05301 seconds