Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] maybe some mistakes about CDO and Teneo
[CDO] maybe some mistakes about CDO and Teneo [message #423502] Wed, 01 October 2008 14:39 Go to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Hi
I already have experienced CDO using my meta model and sharing them with
CDO using the default CDO tutorial and ui.

I configure my server to work with a db store and MySQL database. But
when i launch my prototype I'm surprised that it's not only references
to my models that are stored in my database but all my model

I thought that was the teneo job to do a mapping between attributes
models and tables

So am I using Teneo implicitly ? or it's not the good way to use CDO and
i have to configure Teneo and adapt my code to store models in base ?




Re: [CDO] maybe some mistakes about CDO and Teneo [message #423503 is a reply to message #423502] Wed, 01 October 2008 14:54 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Tristan FAURE schrieb:
> Hi
> I already have experienced CDO using my meta model and sharing them
> with CDO using the default CDO tutorial and ui.
Well done! ;-)

>
> I configure my server to work with a db store and MySQL database. But
> when i launch my prototype I'm surprised that it's not only references
> to my models that are stored in my database but all my model
Could you please rephrase this sentence. I don't understand what you
want to point out...

>
> I thought that was the teneo job to do a mapping between attributes
> models and tables
>
> So am I using Teneo implicitly ?
If it's true that you properly configured a DBStore (and not the
HibernateStore) for your repository, then no ;-)

> or it's not the good way to use CDO and i have to configure Teneo and
> adapt my code to store models in base ?
What do you mean by "store models in base"?
Maybe your problem becomes clearer for me if you try to explain it in
other words.

Cheers
/Eike


Re: [CDO] maybe some mistakes about CDO and Teneo [message #423505 is a reply to message #423503] Wed, 01 October 2008 15:01 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Sory my not very fluent english

In my mind :
- to store models in database (OR mapping) we need teneo.
- to have a server managing model sharing we need CDO

but it seems i think wrong because my database (with dbstore) contains
my model entities and it seems there is a OR mapping (i've a table for
each EClass).

So I don't see Teneo and HibernateStore configuration benefits.

I hope it's more clear :/

Eike Stepper a écrit :
> Tristan FAURE schrieb:
>> Hi
>> I already have experienced CDO using my meta model and sharing them
>> with CDO using the default CDO tutorial and ui.
> Well done! ;-)
>
>>
>> I configure my server to work with a db store and MySQL database. But
>> when i launch my prototype I'm surprised that it's not only references
>> to my models that are stored in my database but all my model
> Could you please rephrase this sentence. I don't understand what you
> want to point out...
>
>>
>> I thought that was the teneo job to do a mapping between attributes
>> models and tables
>>
>> So am I using Teneo implicitly ?
> If it's true that you properly configured a DBStore (and not the
> HibernateStore) for your repository, then no ;-)
>
>> or it's not the good way to use CDO and i have to configure Teneo and
>> adapt my code to store models in base ?
> What do you mean by "store models in base"?
> Maybe your problem becomes clearer for me if you try to explain it in
> other words.
>
> Cheers
> /Eike
>




Re: [CDO] maybe some mistakes about CDO and Teneo [message #423507 is a reply to message #423505] Wed, 01 October 2008 15:17 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
The benefit of Teneo over the standard CDO DBStore is that you have much more control on how your
model is mapped to the database, for example on topics such as naming of tables and columns, where
the foreign keys are placed, join tables (or not), handling of different inheritance mapping
strategies (incl. mappedsuperclass), etc. Teneo does a good job by generating a default mapping and
you can control many things by options or in even more detail by adding JPA annotations to your model.

Maybe Eike can add/complement my remarks (I don't know DBStore that well).

gr. Martin

Tristan FAURE wrote:
> Sory my not very fluent english
>
> In my mind :
> - to store models in database (OR mapping) we need teneo.
> - to have a server managing model sharing we need CDO
>
> but it seems i think wrong because my database (with dbstore) contains
> my model entities and it seems there is a OR mapping (i've a table for
> each EClass).
>
> So I don't see Teneo and HibernateStore configuration benefits.
>
> I hope it's more clear :/
>
> Eike Stepper a écrit :
>> Tristan FAURE schrieb:
>>> Hi
>>> I already have experienced CDO using my meta model and sharing them
>>> with CDO using the default CDO tutorial and ui.
>> Well done! ;-)
>>
>>>
>>> I configure my server to work with a db store and MySQL database. But
>>> when i launch my prototype I'm surprised that it's not only
>>> references to my models that are stored in my database but all my model
>> Could you please rephrase this sentence. I don't understand what you
>> want to point out...
>>
>>>
>>> I thought that was the teneo job to do a mapping between attributes
>>> models and tables
>>>
>>> So am I using Teneo implicitly ?
>> If it's true that you properly configured a DBStore (and not the
>> HibernateStore) for your repository, then no ;-)
>>
>>> or it's not the good way to use CDO and i have to configure Teneo and
>>> adapt my code to store models in base ?
>> What do you mean by "store models in base"?
>> Maybe your problem becomes clearer for me if you try to explain it in
>> other words.
>>
>> Cheers
>> /Eike
>>


--

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] maybe some mistakes about CDO and Teneo [message #423508 is a reply to message #423505] Wed, 01 October 2008 15:26 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Tristan FAURE schrieb:
> Sory my not very fluent english
No problem, I just have to ask ;-)

>
> In my mind :
> - to store models in database (OR mapping) we need teneo.
> - to have a server managing model sharing we need CDO
>
> but it seems i think wrong because my database (with dbstore) contains
> my model entities and it seems there is a OR mapping (i've a table for
> each EClass).
>
> So I don't see Teneo and HibernateStore configuration benefits.
CDO is a 2+ tier framework for distributed shared models and it always
includes some flavour of persistence (ok, with the exception of the
MEMStore). This persistence can be backed by arbitrary backends for
which you need a backend adapter in form of an IStore implementation.
Currently we support two types of backends, JDBC connections to a
relational database and Hibernate session factories (itself probaly
backed by a JDBC connection). These two types handle the O/R mapping
differently. Further CDO does not mandate relational backends. The
upcoming ObjectivityStore will be an example for non-relational persistence.

In the case of the HibernateStore only Hibernate is responsible for the
mapping and this mapping can be controlled by a mapping that is
annotated to the Ecore model or generated automatically (and only this
part is what Teneo is used for). Questions to this part of CDO and Teneo
should best be answered by Martin ;-)

If you're using Teneo without CDO you'll probably end up in a 2 tier
architecture (at least if your client is not a web application).

I know that these architectural aspects are sometimes a bit confusing
due to the flexibility we thought we should add to framework. Did this
answer your question?

Cheers
/Eike

>
> I hope it's more clear :/
>
> Eike Stepper a écrit :
>> Tristan FAURE schrieb:
>>> Hi
>>> I already have experienced CDO using my meta model and sharing them
>>> with CDO using the default CDO tutorial and ui.
>> Well done! ;-)
>>
>>>
>>> I configure my server to work with a db store and MySQL database.
>>> But when i launch my prototype I'm surprised that it's not only
>>> references to my models that are stored in my database but all my model
>> Could you please rephrase this sentence. I don't understand what you
>> want to point out...
>>
>>>
>>> I thought that was the teneo job to do a mapping between attributes
>>> models and tables
>>>
>>> So am I using Teneo implicitly ?
>> If it's true that you properly configured a DBStore (and not the
>> HibernateStore) for your repository, then no ;-)
>>
>>> or it's not the good way to use CDO and i have to configure Teneo
>>> and adapt my code to store models in base ?
>> What do you mean by "store models in base"?
>> Maybe your problem becomes clearer for me if you try to explain it in
>> other words.
>>
>> Cheers
>> /Eike
>>


Re: [CDO] maybe some mistakes about CDO and Teneo [message #423510 is a reply to message #423508] Wed, 01 October 2008 15:37 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
OK !

Both of your answers clarify me some aspects of the architecture

I thank you a lot, every day I'm more surprised about EMF complexity and
richness

Eike Stepper a écrit :
> Tristan FAURE schrieb:
>> Sory my not very fluent english
> No problem, I just have to ask ;-)
>
>>
>> In my mind :
>> - to store models in database (OR mapping) we need teneo.
>> - to have a server managing model sharing we need CDO
>>
>> but it seems i think wrong because my database (with dbstore) contains
>> my model entities and it seems there is a OR mapping (i've a table for
>> each EClass).
>>
>> So I don't see Teneo and HibernateStore configuration benefits.
> CDO is a 2+ tier framework for distributed shared models and it always
> includes some flavour of persistence (ok, with the exception of the
> MEMStore). This persistence can be backed by arbitrary backends for
> which you need a backend adapter in form of an IStore implementation.
> Currently we support two types of backends, JDBC connections to a
> relational database and Hibernate session factories (itself probaly
> backed by a JDBC connection). These two types handle the O/R mapping
> differently. Further CDO does not mandate relational backends. The
> upcoming ObjectivityStore will be an example for non-relational
> persistence.
>
> In the case of the HibernateStore only Hibernate is responsible for the
> mapping and this mapping can be controlled by a mapping that is
> annotated to the Ecore model or generated automatically (and only this
> part is what Teneo is used for). Questions to this part of CDO and Teneo
> should best be answered by Martin ;-)
>
> If you're using Teneo without CDO you'll probably end up in a 2 tier
> architecture (at least if your client is not a web application).
>
> I know that these architectural aspects are sometimes a bit confusing
> due to the flexibility we thought we should add to framework. Did this
> answer your question?
>
> Cheers
> /Eike
>
>>
>> I hope it's more clear :/
>>
>> Eike Stepper a écrit :
>>> Tristan FAURE schrieb:
>>>> Hi
>>>> I already have experienced CDO using my meta model and sharing them
>>>> with CDO using the default CDO tutorial and ui.
>>> Well done! ;-)
>>>
>>>>
>>>> I configure my server to work with a db store and MySQL database.
>>>> But when i launch my prototype I'm surprised that it's not only
>>>> references to my models that are stored in my database but all my model
>>> Could you please rephrase this sentence. I don't understand what you
>>> want to point out...
>>>
>>>>
>>>> I thought that was the teneo job to do a mapping between attributes
>>>> models and tables
>>>>
>>>> So am I using Teneo implicitly ?
>>> If it's true that you properly configured a DBStore (and not the
>>> HibernateStore) for your repository, then no ;-)
>>>
>>>> or it's not the good way to use CDO and i have to configure Teneo
>>>> and adapt my code to store models in base ?
>>> What do you mean by "store models in base"?
>>> Maybe your problem becomes clearer for me if you try to explain it in
>>> other words.
>>>
>>> Cheers
>>> /Eike
>>>




Re: [CDO] maybe some mistakes about CDO and Teneo [message #423511 is a reply to message #423510] Wed, 01 October 2008 15:39 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Tristan FAURE schrieb:
> OK !
>
> Both of your answers clarify me some aspects of the architecture
>
> I thank you a lot, every day I'm more surprised about EMF complexity
> and richness
Me, too ;-)

>
> Eike Stepper a écrit :
>> Tristan FAURE schrieb:
>>> Sory my not very fluent english
>> No problem, I just have to ask ;-)
>>
>>>
>>> In my mind :
>>> - to store models in database (OR mapping) we need teneo.
>>> - to have a server managing model sharing we need CDO
>>>
>>> but it seems i think wrong because my database (with dbstore)
>>> contains my model entities and it seems there is a OR mapping (i've
>>> a table for each EClass).
>>>
>>> So I don't see Teneo and HibernateStore configuration benefits.
>> CDO is a 2+ tier framework for distributed shared models and it
>> always includes some flavour of persistence (ok, with the exception
>> of the MEMStore). This persistence can be backed by arbitrary
>> backends for which you need a backend adapter in form of an IStore
>> implementation. Currently we support two types of backends, JDBC
>> connections to a relational database and Hibernate session factories
>> (itself probaly backed by a JDBC connection). These two types handle
>> the O/R mapping differently. Further CDO does not mandate relational
>> backends. The upcoming ObjectivityStore will be an example for
>> non-relational persistence.
>>
>> In the case of the HibernateStore only Hibernate is responsible for
>> the mapping and this mapping can be controlled by a mapping that is
>> annotated to the Ecore model or generated automatically (and only
>> this part is what Teneo is used for). Questions to this part of CDO
>> and Teneo should best be answered by Martin ;-)
>>
>> If you're using Teneo without CDO you'll probably end up in a 2 tier
>> architecture (at least if your client is not a web application).
>>
>> I know that these architectural aspects are sometimes a bit confusing
>> due to the flexibility we thought we should add to framework. Did
>> this answer your question?
>>
>> Cheers
>> /Eike
>>
>>>
>>> I hope it's more clear :/
>>>
>>> Eike Stepper a écrit :
>>>> Tristan FAURE schrieb:
>>>>> Hi
>>>>> I already have experienced CDO using my meta model and sharing
>>>>> them with CDO using the default CDO tutorial and ui.
>>>> Well done! ;-)
>>>>
>>>>>
>>>>> I configure my server to work with a db store and MySQL database.
>>>>> But when i launch my prototype I'm surprised that it's not only
>>>>> references to my models that are stored in my database but all my
>>>>> model
>>>> Could you please rephrase this sentence. I don't understand what
>>>> you want to point out...
>>>>
>>>>>
>>>>> I thought that was the teneo job to do a mapping between
>>>>> attributes models and tables
>>>>>
>>>>> So am I using Teneo implicitly ?
>>>> If it's true that you properly configured a DBStore (and not the
>>>> HibernateStore) for your repository, then no ;-)
>>>>
>>>>> or it's not the good way to use CDO and i have to configure Teneo
>>>>> and adapt my code to store models in base ?
>>>> What do you mean by "store models in base"?
>>>> Maybe your problem becomes clearer for me if you try to explain it
>>>> in other words.
>>>>
>>>> Cheers
>>>> /Eike
>>>>


Previous Topic:[CDO] O-R mapping
Next Topic:Date attribute in Ecore model
Goto Forum:
  


Current Time: Tue Apr 23 12:13:33 GMT 2024

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

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

Back to the top