Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3965466
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:28:03+00:00 2026-05-20T03:28:03+00:00

I am using jquery full calendar and one of the things it has is

  • 0

I am using jquery full calendar and one of the things it has is an id that should be unique per appointment or the same per a bunch of appointments.

If you have the bunch of the same id’s then all those appointments are considered repeating appointments.

I want to generate a repeating id for each of my appointment and apply it to all the appointments that should have that repeating id.

I figured that the best way to do this would be to use the primary key of my appointment table.

Example

PK: 1, Title: Test1,  Repeating Id: 1
PK: 2, Title: Test2,  Repeating Id: 2
PK: 3, Title: Test2,  Repeating Id: 2
PK: 4, Title: Test2,  Repeating Id: 2
PK: 5, Title: Test3,  Repeating Id: 5

So the first and last row don’t have any other rows that repeat with it.

Rows 2 to 4 do repeat with each other.

Now in my code I generate all the repeating rows before insert. Since nhibernate does batch inserts I do all my inserts at once. So at this time I do not know what the PK will be for any of the rows.

I am wondering can I somehow tell it to take the first item that should be inserted and find it’s PK out and apply it to all the following items repeatingId column?

Right now I can only think of one way to do that and that is insert the first item and then get the PK back and then batch insert all the other items after with the repeating id filled in.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T03:28:04+00:00Added an answer on May 20, 2026 at 3:28 am

    I’m not sure how you will save the first element of a repeating group… but NH batches saves, not id assignments, so you can just do:

    var repeatingId = session.Save(firstAppointmentOfTheGroup)
    foreach (var appointment in repeating)
    {
        appointment.RepeatingId = repeatingId;
        session.Save(appointment);
    }
    

    That said, I don’t understand why you are replicating the model that jquery uses in your model/DB.

    Instead, you should use a normalized model (with RepeatingAppointment having a collection of Appointments) and project that when using it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently using the Full Calendar JQuery plugin on my webpage. I am
I am using jQuery Full calendar. But I am not getting how to set
I'm using this jQuery Full Calendar: http://arshaw.com/fullcalendar/ According to their documentation, I can load
I am using asp mvc 3, jquery full calendar, ms sql sever 2008 and
I'm using jQuery ui Datepicker to display a yearly inline calendar full of special
I am using asp.net mvc 3 and jquery 1.5.2 with jquery full calendar 1.5.1
I'm using the Jquery full calendar plugin, and i want to be able to
I am using JQuery Full Calendar along with Spring MVC. Hello, I have made
I am using jquery fullcalendar which works great. The one issue I have is
I'm working on a rather full-on site using jQuery (if the solution is not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.