Where to Add custom commands for Doctrine ORM commandline Interface? - orm

Can anyone give a detailed explanation on how and where to add custom commands for doctrine?

Related

Generate documentation from Mapstruct code

We generate our mapping with MapStruct and also use the IntelliJ plugin of mapstruct.
Is there a way to generate documentation of this code?
Since we also have some complex custom mappings, it would be great to be able to adapt the documentation. But in first place, we're looking how to automatically generate documentation for the "easy part" of the mappings.

FluentAssertions - complete tutorial for creating custom assertions

Has anybody seen a complete tutorial for creating custom assertion classes with FluentAssertions?
Best regards
I maintain a couple of extension packages for Fluent Assertions, so feel free to take a look at our code to see how we do it:
FluentAssertions.Mvc
FluentAssertions.Ioc.Ninjet
I also recently contributed the assembly reference assertions to the core, so have a look at this pull request. Also have a look at the FA source to see how they implement similar assertions (that's where we started).
The top line is you'll need a class to hold your assertions and an extension method to hook it in.

OpenERP XML-RPC interface and object definition / interface

Does someone know where can I find the definition of the XML-RPC interfaces (in OpenERP 7)? I want to know which parameters and object attributes I need to create or get objects. Examples of the XML for every element would also be very helpful.
You can always inspect objects interactively with ERPpeek.
With this tool you can use Python REPL on any object and see its fields
XMLRPC or NETSVC services are provided by OpenERP for such needs. Go through the OpenERP XML-RPC Web services document, which explains the protocol implementation.
More discussion is here: How to write a Python script that uses the OpenERP ORM to directly upload to Postgres Database

Any Tools to generating mapping-file & class for NHibernate in C#

Any opensource tools for Generating NHibernate mapping file as well as class in C#?
If any other that are helpfull in using NHibernate, Please give me tools list.
Thanks.
MyGeneration is a pretty decent generator. And you can always use T4 which ships with Visual Studio 2005+.
I would recommend using T4. I use it myself to generate code from UML-models. I create the models in UML, and then use T4 to generate classes from the models. I wrote a short blog post about it, check it out if you want some more info on my setup.
If you have yet to try T4, there is no better place to start than Scott Hanselman's excellent post about that you can find here. Make sure you check the link list at the end of the post, it contains some of the best references for T4 information available.
You really also should look into Fluent nHibernate, and especially the "Auto Mapping" features that basically automatically generate the mappings from your classes. I use that to, and it is working great so far. You can very easily override the auto generated mappings wherever you have specific needs not covered by the auto generated stuff.
Hope this was helpful, good luck with your projects!
To follow up tmatuschek's answer:
I use FluentNHibernate to rapidly prototype my .hbm.xml files from my models using the Automapping feature like:
.Mappings(m =>
{
m.AutoMappings.ExportTo(#"c:\temp\mappings\");
m.AutoMappings.Add(AutoMap.AssemblyOf<MyWidget>());
}
After the files are generated from the automapping, I tweak the generated files, then reconfigure the app to use them instead of Auto/Fluent mappings. I find using the standard .hbm.xml mappings to be much easier once my model has stabilized a bit than using an automated mapper.

Doctrine schema.yml generator

I am pretty new to doctrine. I made two small projects with doctrine for my own but now I am about to create big project for my client. The project will have more than 50 tables. Is there any way of generating schema.yml? I tried DB Designer and converted it to schema.yml, but I still had to check and rewrite the definitions by hand. Thanks
you should try ORM Designer (http://www.orm-designer.com/), which covers most of your needs. You can design database just the same way you are used to design in DB Designer and than export to Doctrine (or Propel) schema.yml or schema.xml files (import from existing definitions is also possible). It was developed for our web developers, so it supports symfony plugins, Subversion etc. You can find screencasts and how-tos describing ORM Designer + Symfony + Doctrine/Propel on www.orm-designer.com. If you have any questions, please feel free to ask on our forum or just email us.
Frantisek Troster
ORM Designer
www.orm-designer.com
You can do this with doctrine cli.
Create a cli script by following these detailed steps.
Then run: ./doctrine generate-yaml-db from the script directory.
Hope this helps.