JPA Custom converter

Hi Axelor Team,

Nowaday it’s not possible to assign a dedicated JPA converter to a field (or maybe it’s already possible but I don’t know how). Could you think that adding a “converter” attribute to a field could be interesting ?

Like : <field name="myfield" converter="org.acme.jpa.MyCustomConverter" />

The only one impact is on the Property.groovy:

	private Annotation $converter() {
		if (!encrypted) return null
		// manage custom converter
		def customConverter = attrs['converter']
		if(customConverter != null)
		{
			// check if specified converter class exists
			try { Class.forName("${customConverter}.class") } catch(Exception) { return null; }
			// if yes assign it as the converter
			return annon("javax.persistence.Convert").add("converter", "${customConverter}.class", false) 
		}
		// manage common converter
		def converter = type == 'binary'
			? importName("com.axelor.db.converters.EncryptedBytesConverter")
			: importName("com.axelor.db.converters.EncryptedStringConverter")
		return annon("javax.persistence.Convert").add("converter", "${converter}.class", false)
	}

Regards

Although I have no idea about the JPA converter. I was using format factory for video formatting. Now I check that converter. But I have been searching for other information. You know that we can get all things through Youtube. I have been searching for youtube to mp3 converter because I want to convert the youtube video to mp3 that will be helpful for me. If anyone has any idea then suggest to me.

There are many free YouTube to MP3 converter you can use, and among them, I like 2Conv and Joyoshare Screen Recorder most. 2Conv is a free and online tool to download YouTube videos to MP3, MP4, and AVI. The Joyoshare program supports more formats and is able to download videos and audios from any source in high quality without watermarks and time limitations. I often use it to download online movies for offline viewing.

how relevant information we can see on axelor forum :stuck_out_tongue:

Sorry, I meant to help so I was trying to reply @sternlee

no worries, i wish if we see subject before posting such things

1 « J'aime »

I am still a supporter of paid software. Since you can download a virus, because of the number of unverified programs.