fix creating branches with - in id


for branch creation will probably need to convert - to _ when creating the table in rdb (and also when querying)

add tests for project and branch creation with '-' in id


Doris Lam
April 15, 2020, 1:42 AM

hibernate’s not really involved with branch creation - since we dynamically create tables per branch, there wasn’t a way for hibernate to map things correctly - if you see String.format in the DatabaseDefinitionService or NodeDAOImpl, there’s probably an escape quote needed in the string that’s passed to it

Ward Schweitzer
April 15, 2020, 6:14 PM

I missed the group of hibernate properties in DatabaseDefinitionService. Once I added it there the quoting started to work right (except for smallint…). I pushed a draft pull request if you want to preview.

Doris Lam
April 15, 2020, 7:49 PM

I took a look - I’ll really want to avoid needing to set that property - can you see if just quoting the node%s and the %s in the COPY statements would work?

Doris Lam
April 15, 2020, 8:59 PM

there’s a place in SuffixedPhysicalNamingStrategy.toPhysicalTableName where it’s just used when we create a new branch table, can try setting that to true insetad of name.isQuoted, so it’ll just quote the table name

Ward Schweitzer
April 20, 2020, 8:37 PM

Thanks, Doris. That pointed me in the right direction. I put out a new draft pull request that has much more focused changes.



Ward Schweitzer


Doris Lam