-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Id generator problem.
PostPosted: Sat Jul 16, 2005 2:25 pm 
Newbie

Joined: Sat Jul 16, 2005 2:17 pm
Posts: 2
Hello, I just started using Hibernate for persistence in a Tapestry project. I am stuck with using Filemaker 7 database. I know that it's not oficially supported by Hibernate (and it is very far from my 5-th choice of a database) however it does have ok JDBC driver support.

I am actually able to persist objects from my Tapestry application but the database (from what I understand) hides the primary key column away from the users. Furthermore, the only way that the primary key can be displayed is in a read-only column. I had to create an additional column in the table to be used with the <id> element.

My question is, can I use a readonly column in which a primary key is auto-generated by the database as my <id> element column and if so what generator should I use or how should I go about this.

Thanks in advance.

Sincerely,

Leo


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 16, 2005 4:28 pm 
Expert
Expert

Joined: Thu Jan 29, 2004 2:31 am
Posts: 362
Location: Switzerland, Bern
Maybe
Code:
<generator class="identity"/>

works straight a way.

HTH
Ernst


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 16, 2005 5:55 pm 
Newbie

Joined: Sat Jul 16, 2005 2:17 pm
Posts: 2
Thanks for the suggestion. I'm using a generic dialect since I really can't locate what dialect Filemaker 7 supports and 'identity' is not supported with generic dialect.

Any suggestions?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 18, 2005 1:47 am 
Expert
Expert

Joined: Thu Jan 29, 2004 2:31 am
Posts: 362
Location: Switzerland, Bern
I'd have a look at the source of other dialects which do support the identity generator (MySql). Find out how they do the insert ant how they retrieve the id.
Once you know that you can extend the generic dialect to support Filemaker 7.

HTH
Ernst


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.