Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Texo] Modeling JoinColumns
[Texo] Modeling JoinColumns [message #1217651] Fri, 29 November 2013 01:10 Go to next message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 235
Registered: July 2009
Senior Member
Hi all,
I want to create a OneToMany join from table A to table B. Table B
inherits from an abstract superclass which has @Inheritance(strategy =
InheritanceType.SINGLE_TABLE). Now I wanted to name the JoinColumn and
added an ORM Annotation Join to the EReference in table A. I only filled
the name of the column, since the other fields should have the default
settings. But the generated code looks like that:

@JoinColumns({ @JoinColumn(columnDefinition = "", name = "FK_CATEGORY",
referencedColumnName = "", table = "") })

Why are the fields generated with empty content? Is it possible to leave
them out?

Yours,
Ralf.
Re: [Texo] Modeling JoinColumns [message #1218931 is a reply to message #1217651] Fri, 29 November 2013 14:00 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Ralf,
There is an option when right clicking on a field value in the properties field, to restore the default value.

But this is not really user friendly enough I think.

Can you enter a bugzilla for this? I think when generating java annotations it should ignore the empty value attributes.

gr. Martin

On 11/29/2013 02:10 AM, Ralf Heydenreich wrote:
> Hi all,
> I want to create a OneToMany join from table A to table B. Table B
> inherits from an abstract superclass which has @Inheritance(strategy =
> InheritanceType.SINGLE_TABLE). Now I wanted to name the JoinColumn and
> added an ORM Annotation Join to the EReference in table A. I only filled
> the name of the column, since the other fields should have the default
> settings. But the generated code looks like that:
>
> @JoinColumns({ @JoinColumn(columnDefinition = "", name = "FK_CATEGORY",
> referencedColumnName = "", table = "") })
>
> Why are the fields generated with empty content? Is it possible to leave
> them out?
>
> Yours,
> Ralf.
>


--

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
Re: [Texo] Modeling JoinColumns [message #1218966 is a reply to message #1217651] Fri, 29 November 2013 14:01 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Ralf,
There is an option when right clicking on a field value in the properties field, to restore the default value.

But this is not really user friendly enough I think.

Can you enter a bugzilla for this? I think when generating java annotations it should ignore the empty value attributes.

gr. Martin

On 11/29/2013 02:10 AM, Ralf Heydenreich wrote:
> Hi all,
> I want to create a OneToMany join from table A to table B. Table B
> inherits from an abstract superclass which has @Inheritance(strategy =
> InheritanceType.SINGLE_TABLE). Now I wanted to name the JoinColumn and
> added an ORM Annotation Join to the EReference in table A. I only filled
> the name of the column, since the other fields should have the default
> settings. But the generated code looks like that:
>
> @JoinColumns({ @JoinColumn(columnDefinition = "", name = "FK_CATEGORY",
> referencedColumnName = "", table = "") })
>
> Why are the fields generated with empty content? Is it possible to leave
> them out?
>
> Yours,
> Ralf.
>


--

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
Re: [Texo] Modeling JoinColumns [message #1219815 is a reply to message #1218931] Thu, 05 December 2013 22:50 Go to previous message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 235
Registered: July 2009
Senior Member
Am 29.11.2013 15:00, schrieb Martin Taal:
> Hi Ralf,
> There is an option when right clicking on a field value in the
> properties field, to restore the default value.
>
> But this is not really user friendly enough I think.
>
> Can you enter a bugzilla for this? I think when generating java
> annotations it should ignore the empty value attributes.
>
> gr. Martin
>
> On 11/29/2013 02:10 AM, Ralf Heydenreich wrote:
>> Hi all,
>> I want to create a OneToMany join from table A to table B. Table B
>> inherits from an abstract superclass which has @Inheritance(strategy =
>> InheritanceType.SINGLE_TABLE). Now I wanted to name the JoinColumn and
>> added an ORM Annotation Join to the EReference in table A. I only filled
>> the name of the column, since the other fields should have the default
>> settings. But the generated code looks like that:
>>
>> @JoinColumns({ @JoinColumn(columnDefinition = "", name = "FK_CATEGORY",
>> referencedColumnName = "", table = "") })
>>
>> Why are the fields generated with empty content? Is it possible to leave
>> them out?
>>
>> Yours,
>> Ralf.
>>
>
>
Hi Martin,
this helped me a lot. I created a new (minor) bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=423387

Regards,
Ralf.
Previous Topic:[Texo/EMF] What is the proper way to "customize/extend" your model
Next Topic:[CDO] Trouble resolving packages using OCL within CDO
Goto Forum:
  


Current Time: Thu Apr 18 11:03:39 GMT 2024

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

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

Back to the top