Jpa annotations

23 views
Skip to first unread message

Paul Morris

unread,
Jun 9, 2013, 11:35:21 AM6/9/13
to ormlit...@googlegroups.com
Hi there,

Framework looks really promising. I'm going to be building my first app with it. A couple questions:

Is it possible to annotate fields with both ormlite annotations and jpa annotations?

Coming from Hibernate, I always just used reverse engineering on my db schemas to create the entity classes so it automatically applied unique constraint annotations to classes based on composite unique indexes in the db. I never paid attention to whether those annotations were just markers or if they were actually exercising a constraint at the persistence layer. Do they? In the same vein, does the ormlite uniqueCombo annotation property actually constrain anything or is it just a marker for the db level index constraint?

Paul Morris

unread,
Jun 9, 2013, 1:42:46 PM6/9/13
to ormlit...@googlegroups.com
Just to clarify, I know if you create a table from an entity class (in jpa or I would expect in ormlite using tableutils) that it will create the constraint at the db level, just wondering if that is all it does. Thanks. 

Paul Morris
--
You received this message because you are subscribed to a topic in the Google Groups "ORMLite Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ormlite-user/8tkztlcC1UA/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to ormlite-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply all
Reply to author
Forward
0 new messages