Skip to content

[short-term plan]: obtaining null values for database parameter placeholders #343

@CorvusYe

Description

@CorvusYe
Collaborator

原因备忘:实体类存在继承关系时,传给数据库参数中,子类与父类同时声明了相同属性,实际值被父类覆盖成空值

(备忘,待修复)

Activity

changed the title [-]obtaining null values for database parameter placeholders[/-] [+][short-term plan]: obtaining null values for database parameter placeholders[/+] on May 6, 2025
CorvusYe

CorvusYe commented on May 6, 2025

@CorvusYe
CollaboratorAuthor

计划新特性

支持节点的属性对象字段可以与实体对象直接映射

在一些单次查询的场景中,可能需要将节点的属性跟其他指标数据混合在一个实体中,如:

public PersonDTO {
  @Id
  private String id;
  private String name;

  @Transient
  private Integer numOfFriends;
}

2.0.0 之前的版本上述场景,需要将属性一个个拆解出来做个字段别名,但当字段数较多时,显得很不方便,以下是期望的效果,可以通过下述语句,实现与 PersonDTO 的关系映射。

MATCH (n: person)
OPTIONAL MATCH (n)-[r:FRIEND_OF]-(m:person)
RETURN properties(n) as props, count(r) as numOfFriends
ORDER BY numOfFriends DESC
LIMIT 10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @CorvusYe

        Issue actions

          [short-term plan]: obtaining null values for database parameter placeholders · Issue #343 · nebula-contrib/ngbatis