Closed fasteddys closed 1 year ago
Hi @fasteddys
You are using the tool incorrectly. The changes should be made first to the database directly, using CREATE TABLE
etc. Then simply press Save (ctrl-s) on your <database>.tt
file and that will create your new POCOs for you automatically.
Each time the database is changed, press save on your .tt file to have the generator create the classes you need.
This generator reads the database schema and creates POCOs for you. It does not work the other way around where it creates tables in the database.
Thanks @sjh37 I was able to generate the Poco, but how do I refactor the generated to look like TPer type concrete tables.
Hello Simon, I am trying to learn your cool tool, my goal is to see if I can use it regularly to reverse the DB; make updates to the DB tables; and then reflect those chance back to the DB.
I tried the this so far, I first reversed an pre/existing db table ->
Engine
table. Second, in my middleware I added new inherited objects likeCar
,Auto
,Rickshaw
whichinherit
from myEngine Poco
, I dont know how to do table per types
with your tool and persist them back to DB?Can you please help, I searched your wiki and was not able to find my way, in your code how do I do the following
How to
setup/add/update/enhance
Table Per Type
or Hierarchy, with inherited types in my middleware, for e.g.Engine
-> inside ReversePOCO how can I setup the new modelsCar
,Auto
,Rickshaw
etc. as Table per TypesOnce I make those changes, how do I reflect the new updates from the Reverse Poco Model to the database? is there an some switch or option to run
add-migration
; andupdate database,
from ReversePOCO once I make the updates, or is something I have to do manually outside?