[pgpool-general: 5036] /* nobalance */ key when sql is generated by hibernate

Avi Weinberg AviW at gilat.com
Mon Oct 10 00:16:38 JST 2016


Our system is using hibernate to map java objects to database tables.  We are not writing explicit SQL code to query the database.  It is all done by hibernate when we add/read/update or delete a java object.   I know it is possible to add /* nobalance */ to a query to force it to go to master.  However, how can I do that if the sql is generated by hibernate?


If I  have no way to add it to the query will it have the same affect if I add a property named nobalance to my class (which will be mapped to a column in a table).  Will pgpool scan the hibernate generated query and see this nobalance key in the select clause and force it to go to master (even if it is not a comment, but a column name)?  The downside with this possible workaround is that I cannot do it for a specific query but to all queries accessing this table.

Thanks
IMPORTANT - This email and any attachments is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform the sender immediately and delete this email: you should not copy or use this e-mail for any purpose nor disclose its contents to any person.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20161009/df1b4707/attachment.html>


More information about the pgpool-general mailing list