SnowMoon-Dev commented on code in PR #2340:
URL: https://github.com/apache/incubator-devlake/pull/2340#discussion_r905866716


##########
models/domainlayer/didgen/domain_id_generator.go:
##########
@@ -88,19 +88,30 @@ func NewDomainIdGenerator(entityPtr interface{}) 
*DomainIdGenerator {
 
 func (g *DomainIdGenerator) Generate(pkValues ...interface{}) string {
        id := g.prefix
-       for i, pkValue := range pkValues {
+       isMatch := false
+
+       for _, pkValue := range pkValues {
                // append pk
                id += ":" + fmt.Sprintf("%v", pkValue)
                // type checking
                pkValueType := reflect.TypeOf(pkValue)
                if pkValueType == wildcardType {
                        break
-               } else if pkValueType != g.pkTypes[i] {
-                       panic(fmt.Errorf("primary key type does not match: %s 
should be %s",
-                               g.pkNames[i],
-                               g.pkTypes[i].Name(),
+               }
+
+               for _, pkType := range g.pkTypes {

Review Comment:
   i will fix it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to