fix(GermanBusinessData): Ensure unique ID generation for BusinessRecord
This commit is contained in:
parent
c91439ab6b
commit
d5654a7bc7
@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# 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)
|
## 2024-12-31 - 1.1.1 - fix(dependencies)
|
||||||
Update dependencies and devDependencies to newer versions.
|
Update dependencies and devDependencies to newer versions.
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@fin.cx/opendata',
|
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.'
|
description: 'A TypeScript-based library for accessing and managing open business data, specifically for German companies.'
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,7 @@ export class GermanBusinessData {
|
|||||||
totalRecordsCounter++;
|
totalRecordsCounter++;
|
||||||
if (totalRecordsCounter % 10000 === 0) console.log(`${totalRecordsCounter} total records.`);
|
if (totalRecordsCounter % 10000 === 0) console.log(`${totalRecordsCounter} total records.`);
|
||||||
const businessRecord = new this.openDataRef.CBusinessRecord();
|
const businessRecord = new this.openDataRef.CBusinessRecord();
|
||||||
|
businessRecord.id = await this.openDataRef.CBusinessRecord.getNewId();
|
||||||
businessRecord.data.name = entry.name;
|
businessRecord.data.name = entry.name;
|
||||||
await businessRecord.save();
|
await businessRecord.save();
|
||||||
// console.log(`stored ${businessRecord.data.name}`);
|
// console.log(`stored ${businessRecord.data.name}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user