Score
0
Watch 3.1K Star 6.8K Fork 3.3K

卓源软件 / JeeSite 4.xJavaAGPL-3.0

生成的明细表DataEntry的parent id的验证注解是不是有问题??

Open
tigerA15  Opened this issue

一对多的dataentry,生成的代码里面,有两个问题:

1/默认是没有对明细记录增加验证注解的, 所以一旦代码生成器处理的是一对从的crud,那么明细表的验证全部都没生效.
2/手动对明细记录增加@Valid让其验证生效, 也有问题,比如我的明细表中, parent id的代码:

@Length(min=0, max=64, message="f9m_workflow_parent_id长度不能超过 64 个字符")
	public T9mWorkflowMaster getF9mWorkflowParentId() {
		return f9mWorkflowParentId;
}

上面是自动生成的代码, 但T9mWorkflowMaster又怎么可能用@Length来验证, 于是就出现异常:
{"result":"false","message":"HV000030: No validator could be found for constraint 'org.hibernate.validator.constraints.Length' validating type '...ter'. Check configuration for '...t[0].f9mWorkflowParentId'"}

希望能忙完善代码生成器,谢谢gem.

total 1 participants

Comments (0)

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
Java
1
https://gitee.com/thinkgem/jeesite4.git
git@gitee.com:thinkgem/jeesite4.git
thinkgem
jeesite4
JeeSite 4.x

Help Search