jpa


How can I get constraints working in grails if I'm using JPA annotated classes from a jar file?


Bottomline,
I'm using Grails 1.3.7 and using JPA annotated classes from a JAR file,
But the constraints are not working, meaning they are ignored even if I explicitly code them, like usual in the domain classes,
Is there a way I can get the constraints working?
#Don
1.- JPA classes are .java inside a jar file, I've created Grails Domain classes using this .java classes by just using the grails create-domain-class and using the corresponding package to the .java, so the outcome result in the grail project is
Domain
\
com.myapp.Clazz.groovy
\
package com.myapp.Clazz
class Clazz {
}
Later, I tried to add a Constraint.groovy file to the src/java folder with my constraints, as specified in the following article: Reuse your hibernate/jpa
But when I tried to run the app the compiler gets into an infinte cycle and never finish to compile the project..
Grails documentation here says, that if you annotate your class with #Validateable and provide a static constraints block inside class and register its package in Config.groovy, you will be able to validate this class as usual.

Related Links

Spring data JPA collection pagination total elements
Dynamic schema selection in eclipselink
How to persist a guava hashcode with JPA?
JPA: Unidirectional ManyToMany with existing object to be inserted
spring data lazy loading
JPA Entity with id from referencing class
JPA: implicity persist #ManyToOne entities
modifying the persistence.xml at runtime
Insert object with composite primary key
In JPA, having a many-to-one as primary key throws referential integrity constraint violation
JPA never fetcheable #OneToMany
JPA reading/referencing annotations programatically
JPQL “DISTINCT” returns only one result
Fuse ESB JPA Entity not persisting
Spring Data findBy Enum
PersistenceUnitInfo implementation in EclipseLink

Categories

HOME
shell
batch-file
httparty
turing-machines
gdb
string
webdriver
mysql-workbench
apiblueprint
shiro
nuget
static-site
yandex
web-hosting
pyqt4
azure-container-service
retrofit2
discrete-mathematics
fosrestbundle
fabric.io
google-schemas
endeca
ibeacon-android
plist
tput
google-form
radgridview
selenium-ide
comsol
shared-libraries
mongodb-csharp
null-pointer
jersey-1.0
roslyn
fable-f#
fragment-backstack
delimiter
apktool
aws-codecommit
anki
android-sugarorm
dsx-desktop
hreflang
biztalk-rule-engine
imx6
playframework-2.1
cd
hackintosh
apache-stanbol
vmware-fusion
apriori
contract
angular-http
strftime
nanoc
geotiff
custom-font
seq
juice-ui
cvxpy
ng-grid
tooleap
android-dateutils
jtwig
mediametadataretriever
fink
beanstalk
qbxml
contentcontrol
toran-proxy
java-money
microsoft-reporting
binomial-theorem
skspritenode
git-ftp
shopizer
cross-join
apache-spark-1.3
punycode
jqmodal
draw2d-js
menubar
ecslidingviewcontroller
scriptaculous
notorm
away3d
windows-phone-8-sdk
neos-server
mvc-editor-templates
nevron
scmmanager
window-decoration
failing-tests
google-floodlight
pylucene
commerceserver2007
squishit
undefined-index
resharper-6.0
updatesourcetrigger
office-2007
dot-emacs
aspmenu
wordprocessingml
unmanagedresources
change-management
pbcopy

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App