[Building Sakai] about insert data in the database

Steve Swinsburg s.swinsburg at lancaster.ac.uk
Wed May 13 08:00:05 PDT 2009


You need the hbm.xml so Hibernate knows how to map the table to the  
Class, but can you manage your relationships another way?

What are the relationships you need to map?

cheers,
Steve

---
Steve Swinsburg
Portal Systems Developer
Centre for e-Science
Lancaster University
Lancaster
LA1 4YT

email: s.swinsburg at lancaster.ac.uk
phone: +44 (0) 1524 594870







On 13 May 2009, at 15:22, yolima u wrote:

>
> hi, thanks for your answer. this is my problem:
> i'm doing my *.hmb.xml for create the tables into database, but sakai
> doesn't create the tables with relationships. I mean, when i do files
> *.hbm.xml with relationship (many-to-one and set), sakai doesn't  
> create the
> tables. if i do the *.hbm.xml flies without relationships, sakai  
> creates the
> tables. I have tried to do the relationships to many different way.  
> with
> just bidirectional relationships, or just unidirectional  
> relationships, or
> both, with different examples of tutorials and books and i generated  
> the
> database manually and with hibernate tools i generated the *.hbm.xml  
> files,
> and i have put this files in hibernate forums and they told me that  
> the
> files *.hbm.xml are ok, but sakai doesn't create the tables. So, my  
> question
> is, if i can use hibernate without have this *.hbm.xml files or with  
> the
> files that i have, or if i have to this of other way
>
> thanks
>
>
>
> Steve Swinsburg-2 wrote:
>>
>> The Hibernate mapping files map the database table to the Java
>> classes. If the table doesn't exist or any new columns have been  
>> added
>> to the mapping since last startup, they will be created.
>>
>> cheers,
>> Steve
>>
>> On 13/05/2009, at 4:21 AM, yolima u wrote:
>>
>>>
>>> another little question.
>>>
>>> sakai uses the *.hbm.xml files for insert data into database or just
>>> for
>>> create the tables?
>>>
>>>
>>>
>>> Aaron Zeckoski wrote:
>>>>
>>>> This page should help explain persistence in Sakai:
>>>> http://bugs.sakaiproject.org/confluence/display/BOOT/Persistence
>>>>
>>>> You can use JDBC, Hibernate, or really anything you want.
>>>> -AZ
>>>>
>>>>
>>>> On Tue, May 12, 2009 at 6:33 PM, yolima u  
>>>> <yolimita.uribe at gmail.com>
>>>> wrote:
>>>>>
>>>>> hi all,
>>>>>
>>>>> i have a doubt about how i have to insert data into the database.
>>>>> i have seen that in the code of the tool's web pages, sakai uses
>>>>> beans
>>>>> (and
>>>>> they use the dao of the application) to set o get the data, but i
>>>>> don't
>>>>> understand how insert into the data base. is with the *.hbm.xml?
>>>>> where do
>>>>> sakai routed this files?  or something else?
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/about-insert-data-in-the-database-tp23506704p23506704.html
>>>>> Sent from the Sakai - Development mailing list archive at
>>>>> Nabble.com.
>>>>>
>>>>> _______________________________________________
>>>>> sakai-dev mailing list
>>>>> sakai-dev at collab.sakaiproject.org
>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>
>>>>> TO UNSUBSCRIBE: send email to
>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>>> "unsubscribe"
>>>>>
>>>>
>>>>
>>>>
>>>> -- 
>>>> Aaron Zeckoski (aaronz at vt.edu)
>>>> Senior Research Engineer - CARET - Cambridge University
>>>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>>>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>>>> _______________________________________________
>>>> sakai-dev mailing list
>>>> sakai-dev at collab.sakaiproject.org
>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>
>>>> TO UNSUBSCRIBE: send email to
>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>> "unsubscribe"
>>>>
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/about-insert-data-in-the-database-tp23506704p23514746.html
>>> Sent from the Sakai - Development mailing list archive at  
>>> Nabble.com.
>>>
>>> _______________________________________________
>>> sakai-dev mailing list
>>> sakai-dev at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>
>>> TO UNSUBSCRIBE: send email to
>>> sakai-dev-unsubscribe at collab.sakaiproject.org
>>> with a subject of "unsubscribe"
>>
>>
>>
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to
>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>> "unsubscribe"
>>
>
> -- 
> View this message in context: http://www.nabble.com/about-insert-data-in-the-database-tp23506704p23522760.html
> Sent from the Sakai - Development mailing list archive at Nabble.com.
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org 
>  with a subject of "unsubscribe"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2437 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090513/054c9830/attachment.bin 


More information about the sakai-dev mailing list