spring-projects / spring-projects/spring-data-relational

Support logical fields(method @Column)

Open
#1,835 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: pending-design-work type: enhancement
Dominant language
Java
Stars
827
Forks
394
PR merge metrics
No merged PRs in 30d

Description

Supporting methods as write-only fields, the current implementation causes confusion when using properties because the field value is a placeholder.

Or are there other correct ways to implement logical fields that I don’t know? Please let me know.

expect

    public class Rectangle {

        private int h;
        private int w;

        @Column
        public int area() {
            return h * w;
        }

    }

current

    public class Rectangle {

        private int h;
        private int w;
        @AccessType(AccessType.Type.PROPERTY)
        private int area;
        
        public int getArea() {
            return h * w;
        }

    }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points; begin by locating the @Column mapping and property-access handling in this repository. Compare existing mapping tests, then define regression coverage showing that a method such as Rectangle.area() works without a placeholder field.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.