hibernate ile uygulama geliştirenler artık pek database tarafınla ilgilenmeyebilirler. bir süre sonra hangi kolon hangi değişkene denk geliyor kodu yazan kişi tarafından bilinmez olmaya başlar.
özellike windows da uygulama geliştirirlip linux de mysql e deploy yapılıyorsa %90 kolon ismi büyük küçük harf bağımsızlığıyla ilişkili problemler çıkabilir. çünkü genelde class isimlerimi ClassForDeve gibi büyük küçük harfler barındırıyordur ve bunlar aslında windows daki mysql de sorun çıkarmazken linuxde sorunlara sebep olucaktır.
en güzel ve basit çözüm hibernate.properties veya persistence.xml e aşağıdaki satırı girmek:
bu sayede oluşturulacak tablo ve kolon isimleri class_for_deve şeklinde olucaktır. buda ister linux ister windows mysql versiyonu bağımsız çalışacaktır.
bir diğer çözümde her tablo ve kolon isminin java pojolarında @Column(name="biseler") veya @Table(name="tablo1") şeklinde verilmesidir. bu yöntem çok külfetli olucaktır.
Subscribe to:
Post Comments (Atom)
speed test glasgow
at first test upload was 20mbps, something broke it now it gives 0.07 but I am happy with 129 download and price is 16 £
-
I know its been a long time I have not write anything. because I have not learn or done any new things. I dont want to write regular meaning...
-
After iphone 16 I wanted to test an android and looks like sony xperia 10 VI is nice, which is 6.1 inches, but it was narrow and longer than...
-
in .net 2 if you want to show your application in system tray . you need to add notify icon to your application and set the "ShowInTas...
No comments:
Post a Comment