fix(GermanBusinessData): Ensure unique ID generation for BusinessRecord

This commit is contained in:
2024-12-31 19:49:12 +01:00
parent c91439ab6b
commit d5654a7bc7
3 changed files with 8 additions and 1 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@fin.cx/opendata',
version: '1.1.1',
version: '1.1.2',
description: 'A TypeScript-based library for accessing and managing open business data, specifically for German companies.'
}

View File

@ -57,6 +57,7 @@ export class GermanBusinessData {
totalRecordsCounter++;
if (totalRecordsCounter % 10000 === 0) console.log(`${totalRecordsCounter} total records.`);
const businessRecord = new this.openDataRef.CBusinessRecord();
businessRecord.id = await this.openDataRef.CBusinessRecord.getNewId();
businessRecord.data.name = entry.name;
await businessRecord.save();
// console.log(`stored ${businessRecord.data.name}`);