norm icon indicating copy to clipboard operation
norm copied to clipboard

Error columnDefinition logic(@Column(columnDefinition="TEXT") doesn't work)

Open zhaodice opened this issue 3 years ago • 1 comments

why execute buf.append(null) when columnAnnot.columnDefinition()==null ?

zhaodice avatar Jul 08 '22 04:07 zhaodice

Could you give an example of the problem that this PR fixes?

ccleve avatar Jul 28 '22 17:07 ccleve

Could you give an example of the problem that this PR fixes?

I came across the same issue experienced by this user. Anything put in columnDefinition will not work because it's checking if the column definition is null instead of not null. For example, this is completely ignored. image

It's just as simple as the pull request. I've confirmed this myself and made a temporary fix by just making a SqlMaker that extends StandardSqlMaker, and overrides the getCreateTableSql method. Then I used db.setSqlMaker() to use my custom one. Everything worked perfectly after that.

MagnetiteMC avatar Nov 29 '22 22:11 MagnetiteMC

@MagnetiteMC Ok, I see it now. I simply changed == to !=, rather than do it as he did in the pr, to give the dev more flexibility to specify the entire column definition. Let me know if this works for you.

ccleve avatar Nov 30 '22 00:11 ccleve

@MagnetiteMC Ok, I see it now. I simply changed == to !=, rather than do it as he did in the pr, to give the dev more flexibility to specify the entire column definition. Let me know if this works for you.

@ccleve My bad for the late reply. Everything is fixed after using your change. This pull request can be closed. Thank you for the fix!

MagnetiteMC avatar Jan 20 '23 08:01 MagnetiteMC