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)
-
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...
-
I took the first jab in August 15 around 10:30 in the morning. no pain or nausea or dry mouth, I have been intermittent fasting since 2017 ...
-
I haven't eaten around 67 hours and I am feeling pretty good, like I said after 48 hours I started another 48 hours of fast and come thi...
No comments:
Post a Comment