Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constructor of Bibtexentry should set citeKey, shouldn't it #44

Closed
koppor opened this issue Nov 23, 2015 · 2 comments
Closed

Constructor of Bibtexentry should set citeKey, shouldn't it #44

koppor opened this issue Nov 23, 2015 · 2 comments

Comments

@koppor
Copy link
Member

koppor commented Nov 23, 2015

When reading following statement:

    BibtexEntry e = new BibtexEntry("id", BibtexEntryTypes.ARTICLE);

What should e.getCiteKey() be?

I have expected id, but it was null. Reason: the internal id of an entry is not the cite key. I think, this has reasons. For example, when changing the key of an entry or making the entry invalid, what should happen? As a quick fix, I would suggest that the constructor should call this.setField(KEY_FIELD, id);.

Alternatively, we should use Integers (Longs because of large databases?) as Ids as done in magsilva@9bb2074. Refs JabRef#112.

@simonharrer
Copy link

Hm, you mean a default for the bibtex key if nothing is set? So that there is always a bibtex key?

@koppor
Copy link
Member Author

koppor commented Jun 13, 2022

The key is not always present (leading to user issues, e.g., JabRef#8645). Nevertheless, we need to handle that case somehow in JabRef. We have a builder in place. Thus, this issue is obsolete.

@koppor koppor closed this as completed Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants