Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Hibernate constraints - HowTo?
Hibernate constraints - HowTo? [message #1040654] Sun, 14 April 2013 00:01 Go to next message
J. Michael Dean, M.D. is currently offline J. Michael Dean, M.D.Friend
Messages: 218
Registered: July 2009
Senior Member
I am really new to EMF/Teneo and am trying to move from simple Hibernate
annotations to EMF/Teneo/Hibernate because of its elegance. But I am
having problems with what are probably simple issues.
As an example, here is a typical hibernate annotation:

@NotNull
@Length(min = 2, max = 20)
public String getFirstName() {
return firstName;
}

I am completely dumbfounded about how to accomplish this in the
EMF/Teneo/hibernate environment. Having now finished reading chapter 18
of the "EMF book" I am still confused.

Thanks for help. I am a noob for this technology, but enthusiastic
because it is really quite fantastic.

- Mike
Re: Hibernate constraints - HowTo? [message #1041206 is a reply to message #1040654] Sun, 14 April 2013 20:13 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Michael,
Hibernate constraint annotations are not supported by Teneo. Texo project allows you to enter specific/extra annotations
in the model which are then transferred to code. I would try that...
http://wiki.eclipse.org/Texo/Direct_Java_Annotations

gr. Martin

On 04/14/2013 02:01 AM, J. Michael Dean wrote:
> I am really new to EMF/Teneo and am trying to move from simple Hibernate annotations to EMF/Teneo/Hibernate because of
> its elegance. But I am having problems with what are probably simple issues.
> As an example, here is a typical hibernate annotation:
>
> @NotNull
> @Length(min = 2, max = 20)
> public String getFirstName() {
> return firstName;
> }
>
> I am completely dumbfounded about how to accomplish this in the EMF/Teneo/hibernate environment. Having now finished
> reading chapter 18 of the "EMF book" I am still confused.
>
> Thanks for help. I am a noob for this technology, but enthusiastic because it is really quite fantastic.
>
> - Mike


--

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
Previous Topic:Problem with emf entity icons
Next Topic:Dynamic Ecore from Xsd
Goto Forum:
  


Current Time: Tue Apr 23 11:19:50 GMT 2024

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

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

Back to the top