telosystools

Open full view…

How to use Oracle Sequence with Telosys Tools?

abu0khalique
Fri, 15 May 2015 22:27:16 GMT

What is the way to use Oracle Sequence to generate JPA Entity to be used with annotation @SequenceGenerator?

abu0khalique
Fri, 17 Jul 2015 23:11:07 GMT

Although I could view there are classes in Telosys Genarator for Oracle Sequence I could not use the UI or xml file for dbprep to generate sequences. However this is what I did for the velocity template to generate Oracle Sequence for the entity bean. #foreach( $field in $entity.keyAttributes ) $jpa.fieldAnnotations(4, $field) ## Oracle Sequence, be advised sequance expcted is TABLE_NAME_SEQ @GeneratedValue(generator = "${entity.name}Sequence", strategy = GenerationType.SEQUENCE) @SequenceGenerator(name = "${entity.name}Sequence", sequenceName = "${entity.databaseTable}_SEQ") private $field.formattedType(10) $field.formattedName(12) #if($field.hasInitialValue())= ${field.initialValue} #end; #end #end