Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] Annotation to set EAttribute for no-NULL
[Texo] Annotation to set EAttribute for no-NULL [message #1705605] Mon, 17 August 2015 17:56 Go to next message
Mike Cooper is currently offline Mike CooperFriend
Messages: 59
Registered: February 2011
Member
How do I set a texo annotation for an EAttribute such that the db will refuse to accept NULL values for the column? The db (and presumably hibernate layer) allow a column/EAttribute to be null by default. I want to set a specific EAttribute/column to not accept null values ever.

I've looked over the options when editing my .annotationsmodel but can't seem to find something that matches the above.

Any help would be most appreciated!

[Updated on: Mon, 17 August 2015 17:57]

Report message to a moderator

Re: [Texo] Annotation to set EAttribute for no-NULL [message #1705659 is a reply to message #1705605] Tue, 18 August 2015 08:26 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Mike,
You can use a Basic or Column annotation in the annotations model.
http://stackoverflow.com/questions/5602908/jpa-which-should-i-use-basicoptional-or-columnnullable

I would use Basic annotation for this.

gr. Martin

On 17-08-15 19:56, Mike Cooper wrote:
> How do I set a texo annotation for an EAttribute such that the db will refuse to accept NULL values for the column? The
> db (and presumably hibernate layer) allow a column/EAttribute to be null by default. I want to set a specific
> EAttribute/column to not accept null values ever.
>
> I've looked over the options when editing my .annotationsmodel but can't seem to find something that matches the above.
>
> Any help would be most appreciated!
>


--

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] Annotation to set EAttribute for no-NULL [message #1705730 is a reply to message #1705659] Tue, 18 August 2015 15:33 Go to previous message
Mike Cooper is currently offline Mike CooperFriend
Messages: 59
Registered: February 2011
Member
Thanks Martin! That did the trick!
Previous Topic:[EMFForms][CDO] ENumLiterals represented by combobox are not stored correctly
Next Topic:[EMFForms] How to access an EObject whose EStructuralFeature is being edited
Goto Forum:
  


Current Time: Fri Feb 28 21:28:50 GMT 2020

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

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

Back to the top