Quantcast

[user] Relational Mapping Problem (the sequel to "duplicate backref" issue)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[user] Relational Mapping Problem (the sequel to "duplicate backref" issue)

Beaur, Remi
Hello,

There has been a resolution concerning the "duplicate backref" issue on
Jira :
http://jira.codehaus.org/browse/GRAILS-138 .
The previous error has been treated but now I encounter a new one.

I have a domain named ProjectObjectRelation being the "one" part of 2
one-to-many relations
with domains named SCObject and Project. The property of
ProjectObjectRelation that
represents the mapping with Project is ProjectRelations.

SCObject has multiple sub-classes that extend it (Picture, Video,...).
The error seems to come
from here since it disappears when I keep only one sub-class.

I get the following error :

[groovy] org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'sessionFactory' defined in resource
loaded through InputStream:
Initialization of bean failed; nested exception is
org.hibernate.MappingException:
Repeated column in mapping for entity: ProjectObjectRelation column:
PROJECTRELATIONS_ID (should be mapped with insert="false" update="false")

Any idea?
Thanks,
Rémi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [user] Relational Mapping Problem (the sequel to "duplicate backref" issue)

graemer
Create a new issue and attached your domain model to it and it will
eventually be resolved.

I know that its not nice when the ORM solution effects the way you
want to model your domain, but this tends to always occur with
whatever ORM solutions you are using (hibernate, toplink, activerecord
etc.) May advice would be to simplify you domain model.

Do you REALLY need inheritence?

Regards
Graeme

On 5/23/06, Beaur, Remi <[hidden email]> wrote:

> Hello,
>
> There has been a resolution concerning the "duplicate backref" issue on
> Jira :
> http://jira.codehaus.org/browse/GRAILS-138 .
> The previous error has been treated but now I encounter a new one.
>
> I have a domain named ProjectObjectRelation being the "one" part of 2
> one-to-many relations
> with domains named SCObject and Project. The property of
> ProjectObjectRelation that
> represents the mapping with Project is ProjectRelations.
>
> SCObject has multiple sub-classes that extend it (Picture, Video,...).
> The error seems to come
> from here since it disappears when I keep only one sub-class.
>
> I get the following error :
>
> [groovy] org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'sessionFactory' defined in resource
> loaded through InputStream:
> Initialization of bean failed; nested exception is
> org.hibernate.MappingException:
> Repeated column in mapping for entity: ProjectObjectRelation column:
> PROJECTRELATIONS_ID (should be mapped with insert="false" update="false")
>
> Any idea?
> Thanks,
> Rémi
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [user] Relational Mapping Problem (the sequel to "duplicate backref" issue)

Beaur, Remi
In reply to this post by Beaur, Remi
I will look into this and create another issue on Jira.

I already simplify my model but inheritance is a fundamental part of my
project.
Further simplifications will be possible when many-to-many relations are
available.

Thanks for your great work,
Rémi

Graeme Rocher a écrit :

> Create a new issue and attached your domain model to it and it will
> eventually be resolved.
>
> I know that its not nice when the ORM solution effects the way you
> want to model your domain, but this tends to always occur with
> whatever ORM solutions you are using (hibernate, toplink, activerecord
> etc.) May advice would be to simplify you domain model.
>
> Do you REALLY need inheritence?
>
> Regards
> Graeme
>
> On 5/23/06, Beaur, Remi <[hidden email]> wrote:
>  
>> Hello,
>>
>> There has been a resolution concerning the "duplicate backref" issue
>>    
> on
>  
>> Jira :
>> http://jira.codehaus.org/browse/GRAILS-138 .
>> The previous error has been treated but now I encounter a new one.
>>
>> I have a domain named ProjectObjectRelation being the "one" part of 2
>> one-to-many relations
>> with domains named SCObject and Project. The property of
>> ProjectObjectRelation that
>> represents the mapping with Project is ProjectRelations.
>>
>> SCObject has multiple sub-classes that extend it (Picture, Video,...).
>> The error seems to come
>> from here since it disappears when I keep only one sub-class.
>>
>> I get the following error :
>>
>> [groovy] org.springframework.beans.factory.BeanCreationException:
>> Error creating bean with name 'sessionFactory' defined in resource
>> loaded through InputStream:
>> Initialization of bean failed; nested exception is
>> org.hibernate.MappingException:
>> Repeated column in mapping for entity: ProjectObjectRelation column:
>> PROJECTRELATIONS_ID (should be mapped with insert="false"
>>    
> update="false")
>  
>> Any idea?
>> Thanks,
>> Rémi
>>
>>    
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...