Posts

Showing posts from November 17, 2018

Ballad

Image
For the slow form of popular music such as love songs and pop & rock ballads, see Sentimental ballad. For other uses, see Ballad (disambiguation). "Balladeering" redirects here. For the album, see Balladeering (album). Illustration by Arthur Rackham of the Scots ballad "The Twa Corbies" A ballad / ˈ b æ l ə d / is a form of verse, often a narrative set to music. Ballads derive from the medieval French chanson balladée or ballade , which were originally "danced songs". Ballads were particularly characteristic of the popular poetry and song of the British Isles from the later medieval period until the 19th century. They were widely used across Europe, and later in Australia, North Africa, North America and South America. Ballads are often 13 lines with an ABABBCBC form, consisting of couplets (two lines) of rhymed verse, each of 14 syllables. Another common form is ABAB or ABCB repeated, in alternating 8 and 6 syllable lines. Many ballads

Mysql/Grails: How entity ID is being initialized upon calling Entity.save() (without flushing) on a newly...

Image
up vote 0 down vote favorite I'm using Mysql and Grails. Suppose I have an entity class Book , book table in mysql has an auto_incremented id column. Say the following is my service method: @Transactional public void someMethod() { Book book = new Book("Book Name", "Author Name") // book.id is null here book.save(); println book.id // id is initialized } When I stop on println statement using debugger I see that book 's id property is initialized. As I'm not flushing anything to db the row is not inserted into db yet and hence the id is not generated upon insertion, but some other way. One possible way the id might be initialized seems to be that hibernate runs a query just for fetching the next auto_increment value when the save() method is executed on entity (not