Opened 14 years ago

#4 new task

fmgVen - optimize generated queries to utilize hashed aliases

Reported by: fmguler Owned by: fmguler
Priority: major Milestone: fmgVen 0.3
Component: fmgVen Version:
Keywords: qgenerator, optimize, hashed aliases Cc:

Description

Currently QueryGenerator.generateRecursively() generates SQL select clauses in the form of objectPath.fieldName convention, and QueryMapper.mapRecursively() maps the resultset to the object graph according to this convention. While this approach is simple and works most of the time, it generates too verbose select clauses, and some aliases are too long. Database systems usually have limits on alias length, and crops the alias if it is too long (30 chars for oracle). While this is not a problem for postgresql for 2-3 nested object graphs, depending on the field name length, some of the fields are cropped and are not mapped correctly.

As a solution, we can generate a full object path to hashed alias map in the QueryGenerator?, and use this map while mapping. We may need to pass an extra object (the map) between QGen and QMap.

Also in the scope of this ticket, we can also consider further optimizing generated queries according to best practices.

Change History (0)

Note: See TracTickets for help on using tickets.