facebook

hibernate problem :(

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #268216 Reply

    djwall
    Member

    I am using hibernate On the operation table.what use attribute,when Insert the main table in value. insert the corresponding External Table in value

    for instance:
    table1(id)
    insert into table1(id)
    table2(id)
    with not write hql,Also insert the corresponding table2(id) value

    #268245 Reply

    Riyad Kalla
    Member

    djwall,
    I don’t understand your question. Can you restate it or give an example?

    #268293 Reply

    djwall
    Member

    Thank you very much!

    FundCompany table mapping:

    <class name=”com.fundback.datebase.FundCompany” table=”FundCompany” schema=”dbo” catalog=”FundDb”>

    <id name=”companyId” type=”java.lang.String”>
    <column name=”CompanyId” length=”20″ />
    <generator class=”assigned” />

    <set name=”funds” inverse=”true”>
    <key>
    <column name=”CompanyId” length=”20″ not-null=”true” />
    </key>
    <one-to-many class=”com.fundback.datebase.Fund” />
    </set>

    private Set funds = new HashSet(0);

    FundCompany is main table,
    funds is FundCompany of outside table.
    they own the same row ,when main table update value,the relevant row of outside table update the same value.

    the mapping is one-to-many.

    This function can be realization in hibernate?

    #268298 Reply

    Riyad Kalla
    Member

    I think I understand your request, and the issue is that you must insert in the order necessary to maintain the relationship.

    #268518 Reply

    djwall
    Member

    thank very much.
    yes,I know.
    I do not know whether the update data,Does the need to install attributes.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: hibernate problem :(

You must be logged in to post in the forum log in