Skip to content

Support logical fields(method @Column) #1835

Open
@DreamStar92

Description

@DreamStar92

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;
        }

    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions