micronaut-projects / micronaut-projects/micronaut-data

Access the parent interface method to report a transaction error

Open
#4,040 2 comments 0 reactions 0 assignees View on GitHub
status: awaiting feedback status: awaiting validation type: bug
Dominant language
Java
Stars
482
Forks
229
Avg merge
1d 7h
Merged PRs (30d)
32

Description

Inherits the parent interface and adds a read-only transaction annotation to the interface, prompting a transaction error when accessing the parent interface method

# Environment Information

- **Operating System**: windows
- **Micronaut Version:** 1.3.6
- **JDK Version:** jdk8

### Steps to Reproduce

```
public interface Service {
@Transactional(readOnly = false)
T save1(T o);
}

@Transactional(readOnly = true)
public interface DemoService extends Service{
@Transactional(readOnly = false)
T save2(T o);
}

```

1. save1

Caused by: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed

2. save2

It's ok

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by running the supplied Service and DemoService reproducer on Micronaut 1.3.6 and trace transaction annotation resolution for the inherited save1 method versus save2. Done means save1 can modify data without the read-only connection error while read-only behavior remains correct elsewhere.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.