Skip to main content



      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 13:56 Go to next message
Eclipse UserFriend
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 13:57] by Moderator

Re: [Texo] Annotation to set EAttribute for no-NULL [message #1705659 is a reply to message #1705605] Tue, 18 August 2015 04:26 Go to previous messageGo to next message
Eclipse UserFriend
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 11:33 Go to previous message
Eclipse UserFriend
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: Sun Jul 13 08:59:35 EDT 2025

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

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

Back to the top