Forums Register Login

is it possible to aklter table using hibernate!

+Pie Number of slices to send: Send
dear all i want to develop a web page that adding new columns to table dynamically ,and i use hibernate for communication with DB.is that possible and how please
+Pie Number of slices to send: Send
No. You normally create one table at once and use it forever.
Adding columns dynamically just indicates a flaw in your datamodel.

If you for example want to add a new column every day, then you should rather be using a fixed column denoting the day itself.
+Pie Number of slices to send: Send
 

Originally posted by hani Ibrahim:
dear all i want to develop a web page that adding new columns to table dynamically ,and i use hibernate for communication with DB.is that possible and how please



Yes. However, its not a smart thing to do (as Bauke suggests). Hibernate allows you to run SQL, which gives you access to DDL. However, you would need to delete/reconfigure/open your SessionFactory everytime you did this.
They worship nothing. They say it's because nothing lasts forever. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 750 times.
Similar Threads
creating .hbm.xml file
OJB - Mapping a table w/o Primary Key
Hibernate with 2 column id
alter table command
can i dynamically create a table from the front end
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:33:38.