Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » CDO DBStore with existing Hibernate mapping(mapping cdo to existing schema)
CDO DBStore with existing Hibernate mapping [message #538775] Tue, 08 June 2010 15:30 Go to next message
Eric Lindahl is currently offline Eric LindahlFriend
Messages: 2
Registered: June 2010
Junior Member
I already have an existing graph oriented EAV schema implemented using Hibernate.
I would like to use CDO but I am unsure how and where the mapping should occur.
Should I implement a custom DBStore and skip Teneo?
Should I customize the mappings with Teneo?
Should I skip Hibernate and use JBDC directly?

My feeling is that Hibernate is not efficient at leveraging hierarchical queries to accelerate graph oriented queries.

Thanks!
Eric
Re: CDO DBStore with existing Hibernate mapping [message #538815 is a reply to message #538775] Tue, 08 June 2010 17:12 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Eric,

The IStores that we provide differ in terms of

a) supported CDO functionality (auditing, branching, partial collection
loading, etc)
b) CDO-Specific requirements for the back-end schema (how much/little
has to be changed)

In contrast to the DBStore the Teneo-based HibernateStore is currently
supporting a reduced set of CDO functionality but is way more flexible
to map models to legacy schemas. I still think there are some changes
necessary, but maybe it's limited to the addition of system tables (i.e.
no changes to existing tables). Martin, can you clarify this for us?

As you mentioned there's a third option. You could implement your own
IStore and do what you need to do. As a starter there's some information
in
http://www.eclipse.org/cdo/documentation/manual_20.php?topic =extenders/developing_custom_stores
.. And this forum contains a few threads, too.

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper




Am 08.06.2010 17:30, schrieb eric.lindahl@gmail.com:
> I already have an existing graph oriented EAV schema implemented using
> Hibernate.
> I would like to use CDO but I am unsure how and where the mapping
> should occur.
> Should I implement a custom DBStore and skip Teneo?
> Should I customize the mappings with Teneo?
> Should I skip Hibernate and use JBDC directly?
>
> My feeling is that Hibernate is not efficient at leveraging
> hierarchical queries to accelerate graph oriented queries.
>
> Thanks!
> Eric
>


Re: CDO DBStore with existing Hibernate mapping [message #538825 is a reply to message #538815] Tue, 08 June 2010 17:45 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
I don't have much to add. Indeed some extra system tables are needed. Two other limitations:
- currently the hibernate store does not support composite pk's
- the hibernate store needs a version number

For the rest you can map your legacy database using annotations in the model or in a separate xml file.

The hibernate store does not support an EAV mapping. This is supported by Teneo natively though:
http://wiki.eclipse.org/Teneo/Hibernate/ModelRelational/Enti ty_Attribute_Value_Mapping

But then you don't have any cdo functionality.

gr. Martin

Eike Stepper wrote:
> Hi Eric,
>
> The IStores that we provide differ in terms of
>
> a) supported CDO functionality (auditing, branching, partial collection
> loading, etc)
> b) CDO-Specific requirements for the back-end schema (how much/little
> has to be changed)
>
> In contrast to the DBStore the Teneo-based HibernateStore is currently
> supporting a reduced set of CDO functionality but is way more flexible
> to map models to legacy schemas. I still think there are some changes
> necessary, but maybe it's limited to the addition of system tables (i.e.
> no changes to existing tables). Martin, can you clarify this for us?
>
> As you mentioned there's a third option. You could implement your own
> IStore and do what you need to do. As a starter there's some information
> in
> http://www.eclipse.org/cdo/documentation/manual_20.php?topic =extenders/developing_custom_stores
> .. And this forum contains a few threads, too.
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
>
> Am 08.06.2010 17:30, schrieb eric.lindahl@gmail.com:
>> I already have an existing graph oriented EAV schema implemented using
>> Hibernate.
>> I would like to use CDO but I am unsure how and where the mapping
>> should occur.
>> Should I implement a custom DBStore and skip Teneo?
>> Should I customize the mappings with Teneo?
>> Should I skip Hibernate and use JBDC directly?
>>
>> My feeling is that Hibernate is not efficient at leveraging
>> hierarchical queries to accelerate graph oriented queries.
>>
>> Thanks!
>> Eric
>>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: CDO DBStore with existing Hibernate mapping [message #539052 is a reply to message #538825] Wed, 09 June 2010 13:41 Go to previous messageGo to next message
Eric Lindahl is currently offline Eric LindahlFriend
Messages: 2
Registered: June 2010
Junior Member
Thanks for yoyr reply.

I've not found an implementation of a custom StoreAccessor.
My approach is to implement a Store and use ObjectLong CDOID for hibernate swizzling.

This side of CDO I don't have much problem with, despite that implementing a simple Resource to do the same would have worked as well.

The UI side and all the events seem wrong headed to me.
Why would I need anything other than the same Label Item providers that don't know the CDO namespace?
I do not think the CDO namespace need be anywhere but in specific IMPL of resources, editing domains, and command stacks.

I already implement my own versions of these for logic interaction.

Thanks,
Eric
Re: CDO DBStore with existing Hibernate mapping [message #539726 is a reply to message #539052] Sat, 12 June 2010 09:00 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Eric,

Comments below...


Am 09.06.2010 15:41, schrieb Eric Lindahl:
> Thanks for yoyr reply.
>
> I've not found an implementation of a custom StoreAccessor.
Hmm, what is "custom" and where did you look? CDO ships with four
different IStoreAccessor implementations.

> My approach is to implement a Store and use ObjectLong CDOID for
> hibernate swizzling.
If you want to use Hibernate why don't you use the shipped HibernateStore?

>
> This side of CDO I don't have much problem with, despite that
> implementing a simple Resource to do the same would have worked as well.
The total set of your requirements determines how simple a solution can
be and it seems still unclear to me what these requirement are.

>
> The UI side and all the events seem wrong headed to me.
What in particular? And I can't find "wrong headed" in my dictionary ;-(

> Why would I need anything other than the same Label Item providers
> that don't know the CDO namespace?
Why do you think you need something else?

> I do not think the CDO namespace need be anywhere but in specific IMPL
> of resources, editing domains, and command stacks.
Yes, that sounds like a good design. But note that not all CDO
functionality is made available through EMF APIs. Pessimistic locking is
one example.


> I already implement my own versions of these for logic interaction.
I'm not the UI expert but why do you need CDO-specific editing domains
and command stacks?

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:Loading resources associated with specific packages into generated EMF editor.
Next Topic:CDO introductory example frustration
Goto Forum:
  


Current Time: Fri Apr 26 10:02:00 GMT 2024

Powered by FUDForum. Page generated in 0.03553 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top