This content has been marked as final.
Show 3 replies
-
1. Re: Where to place annotations?
rhino247365 Oct 3, 2006 9:18 AM (in response to vk101)Is there any functional difference between putting the annotations in one place vs another?
Yes, Eclipse will usually pick up on the error.
Don't know about fields themselves, but getters and setters depends on whether or not you need to set TransactionAttributes. -
2. Re: Where to place annotations?
vk101 Oct 3, 2006 10:36 AM (in response to vk101)Perhaps I should clarify. I mean annotations such as Column that intuitively could appear in either place.
-
3. Re: Where to place annotations?
andydale Oct 4, 2006 2:48 AM (in response to vk101)lightbulb,
I personally think it is better to annotate the getter methods, as i used to annotate the fields themselves and ran into a few errors (Hibernate MappingException) when using relations between the Entities.
Just remember that what ever you do, it should be consistent i.e annotaye only the getters or only the fields.
Cheers,
Andy