Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [Teneo] Working with multiple hbm files
[Teneo] Working with multiple hbm files [message #100007] |
Mon, 22 October 2007 10:51  |
Eclipse User |
|
|
|
We use Configuration.addInputStream to add our hbm files to a Configuration.
Hibernate creates entries for each class in each hbm file and returns them
via Configuration.getMappedClasses. However, in
HbDataStore.computeReferrers, it appears that you require that all mapped
classes be resolvable in a single HbDataStore.
What's the recommended approach to working with multiple hbm files?
Thanks!
Larry
|
|
| | |
Re: [Teneo] Working with multiple hbm files [message #100128 is a reply to message #100077] |
Tue, 23 October 2007 17:01   |
Eclipse User |
|
|
|
Hi Larry,
I am not sure but what do you mean with: 'but result in 2 hbdatastores'?
gr. Martin
Larry Stevens wrote:
> Martin
>
> Both of our files are loading, but result in 2 hbdatastores. Perhaps that is
> the problem.
>
> Longer term it would be great to have an extension point for specifying hbm
> files. Bugzilla is https://bugs.eclipse.org/bugs/show_bug.cgi?id=207155
>
> Larry
> "Martin Taal" <mtaal@elver.org> wrote in message
> news:ffkabf$8cb$1@build.eclipse.org...
>> Hi Larry,
>> I am not sure but I think what you mean is that the hbdatastore should be
>> initialized from multiple hbm files. Currently Teneo will search the
>> classpath of the model java classes for files with the name
>> hibernate.hbm.xml. In addition one extra location (which can be set by an
>> option) is searched. So if there are multiple files it will find them.
>> However because Teneo uses a fixed name (hibernate.hbm.xml) it is not that
>> flexible.
>> The only way to accomplish right now is to override HbSessionDataStore or
>> HbEntityDataStore and override the mapModel method and after delegating
>> the call to the super class do your own:
>> getConfiguration().addInputStream(....).
>>
>> You can enter a bugzilla for this so then I can think of a better solution
>> which allows you to pass multiple hbm files.
>>
>> gr. Martin
>>
>> Larry Stevens wrote:
>>> We use Configuration.addInputStream to add our hbm files to a
>>> Configuration. Hibernate creates entries for each class in each hbm file
>>> and returns them via Configuration.getMappedClasses. However, in
>>> HbDataStore.computeReferrers, it appears that you require that all mapped
>>> classes be resolvable in a single HbDataStore.
>>>
>>> What's the recommended approach to working with multiple hbm files?
>>>
>>> Thanks!
>>>
>>> Larry
>>
>> --
>>
>> With Regards, Martin Taal
>>
>> Springsite/Elver.org
>> Office: Hardwareweg 4, 3821 BV Amersfoort
>> Postal: Nassaulaan 7, 3941 EC Doorn
>> The Netherlands
>> 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
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: [Teneo] Working with multiple hbm files [message #100157 is a reply to message #100128] |
Wed, 24 October 2007 10:11  |
Eclipse User |
|
|
|
Martin
Each of our plugins can optionally define its own datastore (via an
extension point.) I'm beginning to think we need to merge them into a single
datastore (at least for relational persistence.)
Thanks
Larry
"Martin Taal" <mtaal@elver.org> wrote in message
news:fflnfl$nju$1@build.eclipse.org...
> Hi Larry,
> I am not sure but what do you mean with: 'but result in 2 hbdatastores'?
>
> gr. Martin
>
> Larry Stevens wrote:
>> Martin
>>
>> Both of our files are loading, but result in 2 hbdatastores. Perhaps that
>> is the problem.
>>
>> Longer term it would be great to have an extension point for specifying
>> hbm files. Bugzilla is
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=207155
>>
>> Larry
>> "Martin Taal" <mtaal@elver.org> wrote in message
>> news:ffkabf$8cb$1@build.eclipse.org...
>>> Hi Larry,
>>> I am not sure but I think what you mean is that the hbdatastore should
>>> be initialized from multiple hbm files. Currently Teneo will search the
>>> classpath of the model java classes for files with the name
>>> hibernate.hbm.xml. In addition one extra location (which can be set by
>>> an option) is searched. So if there are multiple files it will find
>>> them. However because Teneo uses a fixed name (hibernate.hbm.xml) it is
>>> not that flexible.
>>> The only way to accomplish right now is to override HbSessionDataStore
>>> or HbEntityDataStore and override the mapModel method and after
>>> delegating the call to the super class do your own:
>>> getConfiguration().addInputStream(....).
>>>
>>> You can enter a bugzilla for this so then I can think of a better
>>> solution which allows you to pass multiple hbm files.
>>>
>>> gr. Martin
>>>
>>> Larry Stevens wrote:
>>>> We use Configuration.addInputStream to add our hbm files to a
>>>> Configuration. Hibernate creates entries for each class in each hbm
>>>> file and returns them via Configuration.getMappedClasses. However, in
>>>> HbDataStore.computeReferrers, it appears that you require that all
>>>> mapped classes be resolvable in a single HbDataStore.
>>>>
>>>> What's the recommended approach to working with multiple hbm files?
>>>>
>>>> Thanks!
>>>>
>>>> Larry
>>>
>>> --
>>>
>>> With Regards, Martin Taal
>>>
>>> Springsite/Elver.org
>>> Office: Hardwareweg 4, 3821 BV Amersfoort
>>> Postal: Nassaulaan 7, 3941 EC Doorn
>>> The Netherlands
>>> 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
>>
>>
>
>
> --
>
> With Regards, Martin Taal
>
> Springsite/Elver.org
> Office: Hardwareweg 4, 3821 BV Amersfoort
> Postal: Nassaulaan 7, 3941 EC Doorn
> The Netherlands
> 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: [Teneo] Working with multiple hbm files [message #610123 is a reply to message #100007] |
Tue, 23 October 2007 04:11  |
Eclipse User |
|
|
|
Hi Larry,
I am not sure but I think what you mean is that the hbdatastore should be initialized from multiple
hbm files. Currently Teneo will search the classpath of the model java classes for files with the
name hibernate.hbm.xml. In addition one extra location (which can be set by an option) is searched.
So if there are multiple files it will find them. However because Teneo uses a fixed name
(hibernate.hbm.xml) it is not that flexible.
The only way to accomplish right now is to override HbSessionDataStore or HbEntityDataStore and
override the mapModel method and after delegating the call to the super class do your own:
getConfiguration().addInputStream(....).
You can enter a bugzilla for this so then I can think of a better solution which allows you to pass
multiple hbm files.
gr. Martin
Larry Stevens wrote:
> We use Configuration.addInputStream to add our hbm files to a Configuration.
> Hibernate creates entries for each class in each hbm file and returns them
> via Configuration.getMappedClasses. However, in
> HbDataStore.computeReferrers, it appears that you require that all mapped
> classes be resolvable in a single HbDataStore.
>
> What's the recommended approach to working with multiple hbm files?
>
> Thanks!
>
> Larry
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: [Teneo] Working with multiple hbm files [message #610130 is a reply to message #100033] |
Tue, 23 October 2007 08:52  |
Eclipse User |
|
|
|
Martin
Both of our files are loading, but result in 2 hbdatastores. Perhaps that is
the problem.
Longer term it would be great to have an extension point for specifying hbm
files. Bugzilla is https://bugs.eclipse.org/bugs/show_bug.cgi?id=207155
Larry
"Martin Taal" <mtaal@elver.org> wrote in message
news:ffkabf$8cb$1@build.eclipse.org...
> Hi Larry,
> I am not sure but I think what you mean is that the hbdatastore should be
> initialized from multiple hbm files. Currently Teneo will search the
> classpath of the model java classes for files with the name
> hibernate.hbm.xml. In addition one extra location (which can be set by an
> option) is searched. So if there are multiple files it will find them.
> However because Teneo uses a fixed name (hibernate.hbm.xml) it is not that
> flexible.
> The only way to accomplish right now is to override HbSessionDataStore or
> HbEntityDataStore and override the mapModel method and after delegating
> the call to the super class do your own:
> getConfiguration().addInputStream(....).
>
> You can enter a bugzilla for this so then I can think of a better solution
> which allows you to pass multiple hbm files.
>
> gr. Martin
>
> Larry Stevens wrote:
>> We use Configuration.addInputStream to add our hbm files to a
>> Configuration. Hibernate creates entries for each class in each hbm file
>> and returns them via Configuration.getMappedClasses. However, in
>> HbDataStore.computeReferrers, it appears that you require that all mapped
>> classes be resolvable in a single HbDataStore.
>>
>> What's the recommended approach to working with multiple hbm files?
>>
>> Thanks!
>>
>> Larry
>
>
> --
>
> With Regards, Martin Taal
>
> Springsite/Elver.org
> Office: Hardwareweg 4, 3821 BV Amersfoort
> Postal: Nassaulaan 7, 3941 EC Doorn
> The Netherlands
> 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: [Teneo] Working with multiple hbm files [message #610137 is a reply to message #100077] |
Tue, 23 October 2007 17:01  |
Eclipse User |
|
|
|
Hi Larry,
I am not sure but what do you mean with: 'but result in 2 hbdatastores'?
gr. Martin
Larry Stevens wrote:
> Martin
>
> Both of our files are loading, but result in 2 hbdatastores. Perhaps that is
> the problem.
>
> Longer term it would be great to have an extension point for specifying hbm
> files. Bugzilla is https://bugs.eclipse.org/bugs/show_bug.cgi?id=207155
>
> Larry
> "Martin Taal" <mtaal@elver.org> wrote in message
> news:ffkabf$8cb$1@build.eclipse.org...
>> Hi Larry,
>> I am not sure but I think what you mean is that the hbdatastore should be
>> initialized from multiple hbm files. Currently Teneo will search the
>> classpath of the model java classes for files with the name
>> hibernate.hbm.xml. In addition one extra location (which can be set by an
>> option) is searched. So if there are multiple files it will find them.
>> However because Teneo uses a fixed name (hibernate.hbm.xml) it is not that
>> flexible.
>> The only way to accomplish right now is to override HbSessionDataStore or
>> HbEntityDataStore and override the mapModel method and after delegating
>> the call to the super class do your own:
>> getConfiguration().addInputStream(....).
>>
>> You can enter a bugzilla for this so then I can think of a better solution
>> which allows you to pass multiple hbm files.
>>
>> gr. Martin
>>
>> Larry Stevens wrote:
>>> We use Configuration.addInputStream to add our hbm files to a
>>> Configuration. Hibernate creates entries for each class in each hbm file
>>> and returns them via Configuration.getMappedClasses. However, in
>>> HbDataStore.computeReferrers, it appears that you require that all mapped
>>> classes be resolvable in a single HbDataStore.
>>>
>>> What's the recommended approach to working with multiple hbm files?
>>>
>>> Thanks!
>>>
>>> Larry
>>
>> --
>>
>> With Regards, Martin Taal
>>
>> Springsite/Elver.org
>> Office: Hardwareweg 4, 3821 BV Amersfoort
>> Postal: Nassaulaan 7, 3941 EC Doorn
>> The Netherlands
>> 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
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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: [Teneo] Working with multiple hbm files [message #610143 is a reply to message #100128] |
Wed, 24 October 2007 10:11  |
Eclipse User |
|
|
|
Martin
Each of our plugins can optionally define its own datastore (via an
extension point.) I'm beginning to think we need to merge them into a single
datastore (at least for relational persistence.)
Thanks
Larry
"Martin Taal" <mtaal@elver.org> wrote in message
news:fflnfl$nju$1@build.eclipse.org...
> Hi Larry,
> I am not sure but what do you mean with: 'but result in 2 hbdatastores'?
>
> gr. Martin
>
> Larry Stevens wrote:
>> Martin
>>
>> Both of our files are loading, but result in 2 hbdatastores. Perhaps that
>> is the problem.
>>
>> Longer term it would be great to have an extension point for specifying
>> hbm files. Bugzilla is
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=207155
>>
>> Larry
>> "Martin Taal" <mtaal@elver.org> wrote in message
>> news:ffkabf$8cb$1@build.eclipse.org...
>>> Hi Larry,
>>> I am not sure but I think what you mean is that the hbdatastore should
>>> be initialized from multiple hbm files. Currently Teneo will search the
>>> classpath of the model java classes for files with the name
>>> hibernate.hbm.xml. In addition one extra location (which can be set by
>>> an option) is searched. So if there are multiple files it will find
>>> them. However because Teneo uses a fixed name (hibernate.hbm.xml) it is
>>> not that flexible.
>>> The only way to accomplish right now is to override HbSessionDataStore
>>> or HbEntityDataStore and override the mapModel method and after
>>> delegating the call to the super class do your own:
>>> getConfiguration().addInputStream(....).
>>>
>>> You can enter a bugzilla for this so then I can think of a better
>>> solution which allows you to pass multiple hbm files.
>>>
>>> gr. Martin
>>>
>>> Larry Stevens wrote:
>>>> We use Configuration.addInputStream to add our hbm files to a
>>>> Configuration. Hibernate creates entries for each class in each hbm
>>>> file and returns them via Configuration.getMappedClasses. However, in
>>>> HbDataStore.computeReferrers, it appears that you require that all
>>>> mapped classes be resolvable in a single HbDataStore.
>>>>
>>>> What's the recommended approach to working with multiple hbm files?
>>>>
>>>> Thanks!
>>>>
>>>> Larry
>>>
>>> --
>>>
>>> With Regards, Martin Taal
>>>
>>> Springsite/Elver.org
>>> Office: Hardwareweg 4, 3821 BV Amersfoort
>>> Postal: Nassaulaan 7, 3941 EC Doorn
>>> The Netherlands
>>> 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
>>
>>
>
>
> --
>
> With Regards, Martin Taal
>
> Springsite/Elver.org
> Office: Hardwareweg 4, 3821 BV Amersfoort
> Postal: Nassaulaan 7, 3941 EC Doorn
> The Netherlands
> 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
|
|
|
Goto Forum:
Current Time: Wed Apr 30 07:17:14 EDT 2025
Powered by FUDForum. Page generated in 0.04087 seconds
|