symfony - how to store customized Data for doctrine? -
I work with symfony2 and there I use theory as an example for my theory xml-file
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; Has a simple repository-class & lt; Principle-mapping xmlns = "http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" XI: schema location = "Http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> & Lt; Entity name = "Allgemein bundle \ object \ ObjektPosition" table = "objekt_position" repository-class = "Allgemein bundle \ repository \ ObjektPositionRepository" & gt; & Lt; Indexed & gt; & Lt; Index name = "id_objekt_subunternehmer_position_fk2_idx" column = "id_subunternehmer" /> & Lt; Index name = "id_objekt_objektposition_idx" column = "id_objekt" /> & Lt; / Indexed & gt; & Lt; id name = "id" type = "integer" column = "id" & gt; & Lt; Generator strategy = "identity" /> & Lt; / Id & gt; & Lt; Field Name = "ArticelNumer" Type = "Integer" column = "Articlenmar" nullable = "false" /> & Lt; Field name = "presprinetheat" type = "float" column = "preis_provy_enihat" exact = "10" scale = "2" faucet = "incorrect" /> & Lt; Field name = "p1Einheit" type = "float" column = "p1_einheit" exact = "10" scale = "2" faucet = "wrong" /> & Lt; Field name = "p2Einheit" type = "float" column = "p2_einheit" exact = "10" scale = "2" nullable = "true" /> & Lt; Field name = "p3 inihit" type = "float" column = "p3_heat" exact = "10" scale = "2" faucet = "true" /> & lt; Field name = "zusztext" type = "text" column = "zuszattext" nullable = "true" /> & Lt; Field name = "status" type = "integer" column = "condition" zero = "wrong" /> & Lt; Multiple-to-one fields = "idSubunternehmer" target-unit = "suburban" & gt; & Lt; Joining Columns & gt; & Lt; Pair-column name = "id_subunternehmer" referenced-column-name = "novelhearmermann" /> & Lt; / Joining column & gt; & Lt; / Many-to-one & gt; & Lt; Multiple-to-one fields = "idObjekt" target-unit = "Objekt" & gt; & Lt; Joining Columns & gt; & Lt; join-column name = "id_objekt" referenced column-name = "id" /> & Lt; / Joining column & gt; & Lt; / Many-to-one & gt;
When I am generating my entities from the database, the repository-class will be removed. Apart from this, some others think that I have added the XML file.
Can it save customized data in a sperated folder or file, so that I want the entities as often as I want and the customized data will not be lost?
If you are using the console command, at the end of the command --no-backup then , You will be able to preserve your unit class. However, with the addition of '~' at the beginning of the file name, you will change the name of the unit square. Your unit generation code will be in this way (unstretched - without backup)
PHP App / Console Principle: Generated: Organizations
Hope it helps, Cheers!
Comments
Post a Comment