Add a @TxReadOnly annotation
Bug #548622 reported by
Nicolas Leroux
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
play framework |
New
|
Wishlist
|
Unassigned |
Bug Description
This annotation would spawn a read only transaction. Note, I am not sure about the annotation syntax.
Changed in play: | |
milestone: | none → 1.1 |
importance: | Undecided → Wishlist |
Changed in play: | |
milestone: | 1.1 → none |
To post a comment you must log in.
Maybe a better approach is use something like Spring Trasactional annotation:
http:// static. springsource. org/spring/ docs/3. 0.2.RELEASE/ javadoc- api/org/ springframework /transaction/ annotation/ Transactional. html
And just put in your controller/action:
@Transactional( readOnly = true)
public static void foo(Long id) { ... }