Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
ray6080 committed Apr 27, 2023
1 parent bbf03bc commit 71625c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/binder/bind/bind_ddl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ std::unique_ptr<BoundStatement> Binder::bindCreateNodeTableClause(
auto boundProperties = bindProperties(createNodeTableClause.getPropertyNameDataTypes());
auto primaryKeyIdx = bindPrimaryKey(
createNodeTableClause.getPKColName(), createNodeTableClause.getPropertyNameDataTypes());
for (auto& boundProperty : boundProperties) {
if (boundProperty.dataType.typeID == SERIAL && primaryKeyIdx != boundProperty.propertyID) {
for (auto i = 0u; i < boundProperties.size(); ++i) {
if (boundProperties[i].dataType.typeID == SERIAL && primaryKeyIdx != i) {
throw BinderException("Serial property in node table must be the primary key.");
}
}
Expand Down

0 comments on commit 71625c6

Please sign in to comment.