Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsCDO MappingStrategy example and CDO Questions.
https://www.eclipse.org/forums/index.php/mv/msg/136005/428087/#msg_428087
have a database already built, and it has data that maps to an EMF model.
Via CDO, using a class that implements IMappingStrategy, will I be able to
specify how the model maps to the various fields/tables in the db (MySQL)?
If so, does anyone have any examples/documentation of how to use
IMappingStrategy properly for a custom mapping?
Finally, if all of this works, I'm primarily using the mapping to read
data from the db into the model, and would like to be able to perform a
variety of filtering to filter which data actually gets into the model. Is
this possible?
Thanks.]]>Brian Michaud2009-03-09T21:43:59-00:00Re: CDO MappingStrategy example and CDO Questions.
https://www.eclipse.org/forums/index.php/mv/msg/136005/428089/#msg_428089
There are several kinds of backend integrations available for CDO. For
the integration of relational database systems we offer the proprietary
DBStore (which delegates most of the actaul mapping job to
IMappingStrategy, IClassMapping and IFeatureMapping) and a
HibernateStore (which uses Teneo to generate Hibernate mappings). Have
you already looked at the HibernateStore?
If you really plan to implement a custom IMappingStrategy for the
DBStore, that should be possible although there is no documentation
available. The shipped HorizontalMappingStrategy is probably the only
example we can offer. If possible I recommend to subclass
MappingStrategy and ClassMapping. If it turns out that they are
generally useful we can make them public as SPI.
Brian Michaud schrieb:
> I'm trying to find out if CDO will work for what I'm doing.
> Essentially, I have a database already built, and it has data that
> maps to an EMF model. Via CDO, using a class that implements
> IMappingStrategy, will I be able to specify how the model maps to the
> various fields/tables in the db (MySQL)?
> If so, does anyone have any examples/documentation of how to use
> IMappingStrategy properly for a custom mapping?
>
> Finally, if all of this works, I'm primarily using the mapping to read
> data from the db into the model, and would like to be able to perform
> a variety of filtering to filter which data actually gets into the
> model. Is this possible?
>
> Thanks.
>]]>Eike Stepper2009-03-10T05:16:05-00:00Re: CDO MappingStrategy example and CDO Questions.
https://www.eclipse.org/forums/index.php/mv/msg/136005/1035072/#msg_1035072
I was just wondering if there was any update on that lately ? Did somebody worked on a custom mapping ?
I wonder if this mapping is efficient with [0..*] relation, since for each add (for exemple to a relation from A to B), it modifies the container A table to modify the cardinality, then it adds a A_B_list entry, and finally an entry in the B table: wouldn't be simpler to put all this logic in B table ?
I actually don't know very well about DB optimization (I'm not a DB admin ), but I was just wondering if somebody believes that there would be a mapping "much" more efficient than the default one, and maybe alreay start working on it ?
Thanks in advance,
Cheers,
Christophe.
]]>Christophe MOINE2013-04-06T09:12:21-00:00Re: CDO MappingStrategy example and CDO Questions.
https://www.eclipse.org/forums/index.php/mv/msg/136005/1035106/#msg_1035106
The cdo hibernate store provides this type of mapping flexibility where you can choose to use join tables or foreign
keys columns directly in the 'child' table. This can be set globally using options or by annotations in the model. But
the hibernate store does not support all cdo features (as the dbstore which does support all features). Noteably,
branching is not supported nor is chunked reading of large collections. This last topic will be solved if someone needs
it though.
gr. Martin
On 04/06/2013 11:12 AM, Christophe MOINE wrote:
> Hello everybody,
>
> I was just wondering if there was any update on that lately ? Did somebody worked on a custom mapping ?
>
> I wonder if this mapping is efficient with [0..*] relation, since for each add (for exemple to a relation from A to B),
> it modifies the container A table to modify the cardinality, then it adds a A_B_list entry, and finally an entry in the
> B table: wouldn't be simpler to put all this logic in B table ?
>
> I actually don't know very well about DB optimization (I'm not a DB admin :) ), but I was just wondering if somebody
> believes that there would be a mapping "much" more efficient than the default one, and maybe alreay start working on it ?
>
> Thanks in advance,
>
> Cheers,
>
> Christophe.
>
>
--
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@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org]]>Martin Taal2013-04-06T10:26:36-00:00Re: CDO MappingStrategy example and CDO Questions.
https://www.eclipse.org/forums/index.php/mv/msg/136005/1035140/#msg_1035140
> Hello everybody,
>
> I was just wondering if there was any update on that lately ? Did somebody worked on a custom mapping ?
I don't know.
> I wonder if this mapping is efficient with [0..*] relation, since for each add (for exemple to a relation from A to
> B), it modifies the container A table to modify the cardinality, then it adds a A_B_list entry, and finally an entry
> in the B table: wouldn't be simpler to put all this logic in B table ?
Simpler yes, but how would you maintain the cdo_version column in the container table?
> I actually don't know very well about DB optimization (I'm not a DB admin :) ), but I was just wondering if somebody
> believes that there would be a mapping "much" more efficient than the default one, and maybe alreay start working on it ?
Not that I know of.