Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Join Table cannot be resolved
Join Table cannot be resolved [message #435115] Mon, 08 December 2008 20:28 Go to next message
Marcelo Alcantara is currently offline Marcelo AlcantaraFriend
Messages: 48
Registered: July 2009
Member
Hi,

When using Dali with an existing project, it says that a join table cannot
be resolved. But it mentions a table that is the currenttable_jointable. It
was supposed to just refer to the join table.

Someone knows the reason for that?

Attached is an image showing the problem.

Thanks in advance!

Marcelo


Re: Join Table cannot be resolved [message #435116 is a reply to message #435115] Tue, 09 December 2008 00:03 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Since your OneToMany does not specify a 'mappedBy' element, it becomes a
unidirectional OneToMany. This type of OneToMany requires a join table.
Since a JoinTable annotation is not specified, the OneToMany mapping uses
the default join table name (which is the concatenated names of the two
tables, separated by an underscore). Dali is simply calculating that default
name and checking to see whether an actual table with that name exists on your
database. Since it does not, you get an error message.

See the JPA spec
2.1.8.5.1 Unidirectional OneToManyRelationships
9.1.24 OneToMany Annotation
9.1.25 JoinTable
etc. :-)


Marcelo Alcantara wrote:
> When using Dali with an existing project, it says that a join table cannot
> be resolved. But it mentions a table that is the currenttable_jointable. It
> was supposed to just refer to the join table.
>
> Someone knows the reason for that?
Re: Join Table cannot be resolved [message #435117 is a reply to message #435116] Tue, 09 December 2008 13:37 Go to previous message
Marcelo Alcantara is currently offline Marcelo AlcantaraFriend
Messages: 48
Registered: July 2009
Member
Hi Brian.

Just got the spec.

Perfect now.

Thanks!

Marcelo

"Brian Vosburgh" <first.last@oracle.com> escreveu na mensagem
news:ghkckc$4eg$1@build.eclipse.org...
> Since your OneToMany does not specify a 'mappedBy' element, it becomes a
> unidirectional OneToMany. This type of OneToMany requires a join table.
> Since a JoinTable annotation is not specified, the OneToMany mapping uses
> the default join table name (which is the concatenated names of the two
> tables, separated by an underscore). Dali is simply calculating that
> default name and checking to see whether an actual table with that name
> exists on your database. Since it does not, you get an error message.
>
> See the JPA spec
> 2.1.8.5.1 Unidirectional OneToManyRelationships
> 9.1.24 OneToMany Annotation
> 9.1.25 JoinTable
> etc. :-)
>
>
> Marcelo Alcantara wrote:
>> When using Dali with an existing project, it says that a join table
>> cannot be resolved. But it mentions a table that is the
>> currenttable_jointable. It was supposed to just refer to the join table.
>>
>> Someone knows the reason for that?
Re: Join Table cannot be resolved [message #613681 is a reply to message #435115] Tue, 09 December 2008 00:03 Go to previous message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Since your OneToMany does not specify a 'mappedBy' element, it becomes a
unidirectional OneToMany. This type of OneToMany requires a join table.
Since a JoinTable annotation is not specified, the OneToMany mapping uses
the default join table name (which is the concatenated names of the two
tables, separated by an underscore). Dali is simply calculating that default
name and checking to see whether an actual table with that name exists on your
database. Since it does not, you get an error message.

See the JPA spec
2.1.8.5.1 Unidirectional OneToManyRelationships
9.1.24 OneToMany Annotation
9.1.25 JoinTable
etc. :-)


Marcelo Alcantara wrote:
> When using Dali with an existing project, it says that a join table cannot
> be resolved. But it mentions a table that is the currenttable_jointable. It
> was supposed to just refer to the join table.
>
> Someone knows the reason for that?
Re: Join Table cannot be resolved [message #613684 is a reply to message #435116] Tue, 09 December 2008 13:37 Go to previous message
Marcelo Alcantara is currently offline Marcelo AlcantaraFriend
Messages: 48
Registered: July 2009
Member
Hi Brian.

Just got the spec.

Perfect now.

Thanks!

Marcelo

"Brian Vosburgh" <first.last@oracle.com> escreveu na mensagem
news:ghkckc$4eg$1@build.eclipse.org...
> Since your OneToMany does not specify a 'mappedBy' element, it becomes a
> unidirectional OneToMany. This type of OneToMany requires a join table.
> Since a JoinTable annotation is not specified, the OneToMany mapping uses
> the default join table name (which is the concatenated names of the two
> tables, separated by an underscore). Dali is simply calculating that
> default name and checking to see whether an actual table with that name
> exists on your database. Since it does not, you get an error message.
>
> See the JPA spec
> 2.1.8.5.1 Unidirectional OneToManyRelationships
> 9.1.24 OneToMany Annotation
> 9.1.25 JoinTable
> etc. :-)
>
>
> Marcelo Alcantara wrote:
>> When using Dali with an existing project, it says that a join table
>> cannot be resolved. But it mentions a table that is the
>> currenttable_jointable. It was supposed to just refer to the join table.
>>
>> Someone knows the reason for that?
Previous Topic:API changes in recent Dali 2.1 builds
Next Topic:Generating annotations in getters
Goto Forum:
  


Current Time: Fri Mar 29 12:33:36 GMT 2024

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

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

Back to the top