zoukankan      html  css  js  c++  java
  • "Integration" between Rails' ActiveRecord and Java's Hibernate Stack Overflow

    "Integration" between Rails' ActiveRecord and Java's Hibernate - Stack Overflow

    "Integration" between Rails' ActiveRecord and Java's Hibernate - Stack Overflow

    Hi everybody: let me do a bit of "concept mining" here: I am involved in mantaining/extending an application whose functionality is distributed across several servers. For example, we have a machine running the ApplicationServer, another running the DataServer and so on.

    This application has a Web Interface. The current UI is totally implemented in Java, and in a way that makes adding new functionality hard. One of my goals is extending this interface, and we're considering shifting the whole thing to another platform, like Rails, for example.

    Problem being, the database that is manipulated by the UI (possibly Rails in the future) is also manipulated by ApplicationServer (Java).

    So, my main question is: both Rails and Java can access databases through their own ORM (ActiveRecord for Rails and Hibernate or similar for Java). Is there any way to guarantee that the mappings are consistent?*

    Even if the answer is a hard "no", I'd also like to hear your thoughts on how you'd approach this scenario.

    I hope the question is clear enough, but warn me if it isn't and I'll edit accordingly. =D

    *Edit: per request, I'm extending this explanation: what I mean is, how to make sure things don't break when someone needs to add a new field to the database and edits the Hibernate mapping because of it? I know that Rails "guesses" the entity attributes pretty much by itself (making things easier), but I was wondering if there was some "magical way" to "connect" the ActiveRecord directly to the Hibernate mapping.

  • 相关阅读:
    第七章 下
    第七章 上
    第六章 下
    第六章 上
    第五章 下
    linux 系统通过安装包安装mysql 8 步骤(非MariaDB)
    热烈庆祝博客换了新皮肤
    异常处理
    栈计算逆波兰表达式
    栈计算中缀表达式
  • 原文地址:https://www.cnblogs.com/lexus/p/2360725.html
Copyright © 2011-2022 走看看