ngbatis icon indicating copy to clipboard operation
ngbatis copied to clipboard

PathWrapper orm

Open CorvusYe opened this issue 2 years ago • 3 comments

in this case: https://github.com/nebula-contrib/ngbatis/blob/master/ngbatis-demo/src/test/java/ye/weicheng/ngbatis/demo/NebulaBasicDaoTests.java#L465

we need to add another condition branch to implement the orm of PathWrapper.

下面代码需要追加一个条件分支来实现 PathWrapper 的 orm

https://github.com/nebula-contrib/ngbatis/blob/master/src/main/java/org/nebula/contrib/ngbatis/handler/ObjectResultHandler.java#L67-L93

Such as:

 else if(v instanceof PathWrapper) {
    newResult = fillResultByPath( // fillResultByPath is not exists now.
      (PathWrapper) v,
      newResult,
      columnNames,
      resultType,
      columnName
    );
  } 

CorvusYe avatar Sep 13 '23 04:09 CorvusYe

@wey-gu I want to pr for this,Thank you

shbone avatar Sep 27 '23 08:09 shbone

@CorvusYe what do I need to do? add another condition branch to https://github.com/nebula-contrib/ngbatis/blob/master/src/main/java/org/nebula/contrib/ngbatis/handler/ObjectResultHandler.java#L67-L93 ? solve the ORM problem?

shbone avatar Sep 27 '23 09:09 shbone

@shbone Your understanding is correct. A conditional branch needs to be added, but the corresponding method is not available at the moment. Need to design and implementation, how to establish the specific mapping relationship I have not thought well, you can also think about how to achieve the path of the entity mapping.

CorvusYe avatar Sep 27 '23 09:09 CorvusYe