Re: [Kraft-user] Kraft DB Fragen / Sortierungsproblem
Kraft helps to handle daily quotes and invoices in your small business
Brought to you by:
kfreitag
From: Klaas F. <kr...@fr...> - 2011-07-20 18:23:03
|
Am Dienstag, 19. Juli 2011, 18:48:46 schrieb Andreas Wuest: Hallo, > so hab die Rechnung erstellt, hatte nach der Migration die üblichen Charset > Probleme, weil ich noch was manuell in die wordLists Tabelle eintragen > musste (hab den Eindruck da ging was verloren). KOmischerweise hat das > hinzufügen mit dem CLI Client und Umlauten mal wieder nicht funktioniert, > mit dem mysql query browser hats dann getan. Hmm, ich hoffe, die Charset Probleme gibts hoffentlich nur beim Umstieg von KDE3 -> KDE4, das ist mir bekannt. Da war ein 'Bock' drin. > Dennoch hätte ich 2 Fragen zum Datenbank Design: > > 1. Warum gibt es in der wordLists Tabelle keinen einfachen künstlichen > Schlüssel (id spalte)? Löschen ist aktuell nicht ganz einfach, muss ich > immer einen eindeutigen Text suchen, damit das tut :-( Naja, üblicherweise mach ich das mit einer Id, das ist wahr. Aber nötig ist sie nicht, hier sind beide Spalten Teil des Primärschlüssels, was ganz ok ist, weil das doppelte Einträge vermeidet. Also ja, man könnte das mit ner Id auch machen. Dann aber auch nen Sortkey. Im Code seh ich auch gerade, dass die unsortiert ausgelesen werden. Ich hab da mal ein sort eingefügt. > 2. Die FK Beziehung > DocTexts.docType -> DocTypes.name > ich nicht wirklich schön (sofern das eine FK beziehung sein soll). > Wieso wird hier nicht mit der DocTypeId gearbeitet. Im obigen fall wäre > die Beziehung ja weg, wenn man den Namen im DocType ändert nachdem man > schon Vorlagen angelegt hat. Im aktuellen Code wird die ID-basierte Beziehung verwendet, siehe defaultprovider.cpp zeile ~64. Der alte String basierte FK ist nicht mehr in Betrieb. Könnte die Spalten mal löschen, das ist richtig. > Im Anhang noch ein Screenshot. Die Sortierung ist meiner Meinung nach > falsch herum. Wenn ich creation date absteigend sortiere, dann erwarte ich > eigentlich die neuste rechnung ganz oben. fände ich jedenfalls intuitiv, > oder? im moment ist das genau anderst herum. Hmm, stimmt natürlich was Du sagst. Bei mir ist das auch so. Allerdings wird der Sortierstatus gespeichert, dh. einmal Ändern müsste persistent sein. Dafür könntest Du mal nen Bugreport machen. Danke & Viele Grüße, Klaas |