[Technik] hsadmin reloaded: JPA-Legacy-Mappings auf hsdb (war: grober Migrationsplan für 1.0)

Michael Hoennig michael at hostsharing.net
Thu Jul 12 23:10:44 CEST 2007


Moin Moin,

> ich bin gerade dabei, JPA-Entity-Beans (eine bestimmte Art von
> Java-Klasse) für unsere derzeitige (produktive) Config-Datenbank hsdb zu
> erstellen. D.h. ich werde die Persistenzebene von hsadmin reloaded
> (hsar) so aufbauen, dass wir schrittweise migrieren können.

ich habe bereits die für hsadmin wichtigsten Entity-Klassen mit groben
Mappings implementiert:

hsh00_hsdb1=> \dt
             List of relations
 Schema |       Name       | Type  | Owner
--------+------------------+-------+-------
 public | bank_account     | table | hsh00	-> BankAccount
 public | basecomponent    | table | hsh00
 public | basepacket       | table | hsh00
 public | billdata         | table | hsh00
 public | business_partner | table | hsh00	-> Customer
 public | component        | table | hsh00
 public | contact          | table | hsh00	-> Contact
 public | domain           | table | hsh00	(*)
 public | hive             | table | hsh00	-> Hive
 public | inet_addr        | table | hsh00	-> INetAddress
 public | packet           | table | hsh00	-> Pac
 public | packet_component | table | hsh00
(12 rows)

Funktionieren tun bisher aber nur INetAddress, Hive und Contact. Probleme
habe ich noch damit, die Verknüpfungen in JPA identisch zum Legacy-System
abzubilden und mit dem Datentyp Date, wo evtl. ein Versionskonflikt
(PostgreSQL-Server/PostgreSQL-Client/JDBC-Treiber/Hibernate/JPA)
vorliegt. Bei den Sequences für die automatische ID-Vergabe bekomme ich
auch noch Fehlermeldungen, dass da irgendwas zwischen dem Legacy-System
und meinen JPA-Mappings nicht stimmt.

Es geht voran, morgen geht's weiter ...

Alles Gute wünscht
	Michael

(*) Die Tabelle hatte wohl schonmal jemand angelegt, evtl. schon
Stephan, aber sie wird noch nicht verwendet.


-- 
Hostsharing eG | c/o Stilflut | Friedensalle. 120 | D-22765 Hamburg
Registergericht Hamburg, GnR 1007 | USt.-ID-Nr.: DE218602793
vertretungsber. Vorstand: Uwe Müller, Peter Niederlag, Michael Hönnig
phone+fax: +49 700 HOSTSHARING (= +49 700 46787427)
http://www.hostsharing.net | http://www.xing.com/go/invuid/Michael_Hoennig


More information about the Technik mailing list