fix(GermanBusinessData): Ensure unique ID generation for BusinessRecord

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

View File

@ -1,5 +1,11 @@
# Changelog
## 2024-12-31 - 1.1.2 - fix(GermanBusinessData)
Ensure unique ID generation for BusinessRecord
- Added generation of a new ID for each BusinessRecord in GermanBusinessData.
- Ensures each business record has a unique identifier.
## 2024-12-31 - 1.1.1 - fix(dependencies)
Update dependencies and devDependencies to newer versions.

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}`);