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

JPA how to remove parent without delete children?
JPA entityManager is null in Pointcut
JPA: NamedQuery of name: <query> not found
Glassfish EJB 3 OpenJPA 2
owned and unowned relationships
Is there a way to get all managed entities from an EntityManager
Multi-Tenant Seam + JPA Application
JPA mapping error for sequence number
JPA : What is the behaviour of merge with lazy initialized collection?
JPA problem one-to-one association cascade= PERSIST
JPQL we can't CONCAT(String, Integer) EclipseLink?
Cant persist an entity
How to implement self join in JPA?
Unneeded column added trying to set up OneToMany relationship
EntityManager doesn't refresh the data after querying
How To modify Eclipselink JPA 2.0 connection retry behavior

Categories

HOME
cygwin
httparty
scikit-learn
apache-flink
rdbms
twig
angular-formly
static
sitecore
r-googlesheets
google-cloud-functions
alsa
nstableheaderview
sendgrid-api-v3
pattern-matching
pcl-crypto
enthought
activecollab
nancy
frequency-distribution
apache2.4
cgbitmapcontext
flask-sqlalchemy
direct3d11
data.stackexchange.com
android-sharedpreferences
linked-data
inversion-of-control
comparable
custom-controls
kudu
left-join
papaparse
installshield-le
jwplayer6
searchkit
hivemq
diacritics
signals-slots
kill
mcustomscrollbar
levenshtein-distance
dbnull
tcc
knime
signal-strength
dapper-simplecrud
spring-integration-sftp
globalize
launchctl
video-conferencing
wpas
spring-data-couchbase
headless
sundials
arules
janus
d3-force-directed
flex-monkey
hclust
cifilter
jtwig
uiactionsheet
grass
atan2
boomerang
linklabel
wiredep
lazybones
microsoft-reporting
fuelcms
phonertc
wso2greg
baasbox
omnifaces
execve
browserify-shim
addressing-mode
webfinger
jama
accesscontrolexception
kendo-dataviz
breakout
ice-cube
ui-select2
dolby-audio-api
video-codecs
saleslogix
subgraph
jdb
httponly
ikimagebrowserview
multiplatform
globals
data-mapping
wcf-instancing
windows-identity
wcf-proxy

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App